8. Printing
Commands for printing:
- lp print
- lp [name of file] print file to default printer
- lp d [name of print queue] [file to print] will put a file in
a specific print queue.
- lpstat check status of print queue
- lpstat d (shows what default printer is)
- lpstat t shows all available printers
- lpadmin d [name of printer] sets default printer (to set a
personal default printer edit the .cshrc (or other environment file) with the following
setenv lpdest mydesk, the setenv is standard, the lpdest is the printer that you want as
your default (ip or name) and mydesk is the name of the queue.
For the system to decide on printer, it will decide
- load distribution
- first available printer
- content type (ascii, postscript, etc)
To add a printer using the GUI tool (Common Desktop Environment in Solaris). In root,
go to admin tools, check browse, printers then add your printer. To not print a banner,
type lp o nobanner[filename] To make the printer never print banners,
go into /etc/lp/interfaces and find name of printer. Then use the vi editor and go about
3000 lines down (not really 3000 although it is alot) to nobanner=no
and make it say nobanner=yes, so it wont ever print a banner.
To allow usage of a printer (can be done on a local node)
- accept [username] (stops at print queue)
- reject [username] (stops at print queue)
To allow or disallow printing at printserver (individual printer)
- enable [printername]
- disable [printername]
To move a print queue type (this only moves the queue)
- lpmove [source] [destination]
To set up a print class do the following: (a print class can print faster, distribute
load, and if you dont know content type)
- lpadmin p [1st printername] c [class or group name]
- lpadmin p [2nd printername] c [class or group name]
Note: can be different from first if you want them separate (i.e. lpadmin p
bosshplaserjet c groupA) the first two commands assigns the printer to groups
- reject [1st printername]
- reject [2nd printername] These two commands prevent any direct use of the
printer
- accept [group name] (i.e. accept groupA] this command will allow
the printer to only accept jobs for the printer you named or group
lpadmin d [group name] (i.e. lpadmin d groupA) this
will make the group printer the default for that group, this command also works at the
system level
Go to Chapter 7
Go to Index
Go to Chapter 9