Table of Contents

lpr Print error under UNIX hosts

This page applies to anyone receiving an lpr error under UNIX hosts similar to one listed below:

lpr: unable to print file: client-error-bad-request

Problem

The problem is that gutenberg was recently updated which houses all printers for the department. This provides newer software versions which provide newer features and functionality, however this also seems to have caused an error with older hosts.

Workstations running Debian Lenny do not have printing issue as they have newer cups version. If your Linux workstation is PCN supported and isn't running Debian Lenny, let PCN know and we can schedule a time to upgrade this.

Solution

A solution for older hosts is to set an environment variable which will let you print from lpr again.

For bash shell users, set the following variable in your .bashrc file:

export LANG="en_US.UTF-8"

For *csh shell users, set the following variable in your .tcshrc file or similar:

setenv LANG "en_US.UTF-8"

Non-english speakers should be able to specify their locale in place of en_US, the important part is the UTF-8 encoding. If your chosen locale does not work, please let us know so we can correct the problem.

These are now the default on multi-user machines to fix this printing issue:

export LANG="en_US.UTF-8"
export LANGUAGE="en_US"
export LC_ALL="C"