Printing from a Public Linux system at CLASSE
This page contains instructions on printing from a public linux system at CLASSE. All of CLASSE's printers should be already listed known to your system, so to print you need only specify the file and printer to use.
Viewing available printers
RedHat 9 and above use CUPS (Common UNIX Printing System). To view a list of available printers:
- View the Default Printer utility described in the next section.
- Or type the command lpstat -a at the command line.
- Also, more information can be found by browsing to http://localhost:631.
Setting the default PRINTER
- In the GNOME and KDE Desktop Environments, the default printer can be set per user by selecting the Panel->Preferences->More Preferences->Default Printer. Choose a printer and select Set Default.
- Or you may define a default printer in your login scripts.
- If you are using the bash shell and want lt104_hp_8000 to be your default printer, add export PRINTER=lt104_hp_8000 to your /home/$USER/.bash_profile file.
- If you are using the tcsh (or csh) shell, you would add setenv PRINTER lt104_hp_8000 to your /home/$USER/.login file.
- Or you can change your default printer using the above commands from a terminal. However, any changes to your PRINTER environment variable only effect the terminal they are made from (and applications started from that terminal).
Printing from the command line
PLEASE NOTE LPR assumes that all non-postscript files are standard text. Therefore, attempting to print a file from the command line that is neither text nor postscript will result in many pages of garbage.
- Type lpr file where file is the text or postscript formatted file that you would like to print. This will be printed at the default printer.
- Alternatively, if you would like to specify which printer to use, type lpr -P printer file where printer is your desired printer. Please see lpstat -a or PrinterList for the correct printer (or queue) name. ex. To print the file test to lt104_hp_8000, I would type: lpr -P lt104_hp_8000 test
- You may also send the job directly to your desired print queue on lnx104 ex. lpr -P lt104_hp_8000@lnx104 test
Printing from an X application
Most application files (such as OpenOffice documents) are not in postscript and may not be printed from the command line. However, when printing from X applications, the postscript conversion is done for you. Therefore, to print OpenOffice documents or web pages, you must print from their respective X application.
- Click on the File menu item and choose Print
- The Print window should appear.
- To specify the printer to use, look for a text area labeled Command or Print Command. Clear that text area and enter lpr -P printer. If there is no Command text area, click on Properties and enter lpr -P printer in the Command text area of the window that appears. Again, please see lpstat -a or PrinterList for the correct printer name.
Alternatively, from the X application's print window you may choose
Print to File to save a postscript version of your current document. You may then print this postscript file from the command line as outlined above.