Adding network printers to Solaris For Solaris 2.5/2.6 make sure you have the following pkgs installed: SUNWlpmsg, SUNWlpr, SUNWlps and SUNWlpu. For Solaris 7/8 make sure you have the following pkgs installled: SUNWscpu, SUNWpsu, SUNWpsr, SUNWpcr and SUNWpcu . First verify the printer service is installed and running: # lpstat -r scheduler is not running Ok the scheduler is not running so we need to start/restart it: # /usr/lib/lp/lpsched Print services started. Ok now that printer services are running lets see what printers we have defined: # cat /etc/printers.conf # # If you hand edit this file, comments and structure may change. # The preferred method of modifying this file is through the use of # lpset(1M) or fncreate_printer(1M) # 1254L8K:\ :bsdaddr=faulkner,1254L8K,Solaris: The name before the colon is the printer queue name. bsdaddr=server,destination[,Solaris] Make sure server and destination are in /etc/hosts. For more info on printers.conf: man -s 4 printers.conf "destination" of course needs to be running lpd (or software enabled lpd such as an HP JetDirect), listening on TCP port 515, if the remote printer is on a Sun or unix server make sure the line in /etc/services on the remote Solaris is uncommented out: printer 515/tcp spooler # line printer spooler (Consult RFC 1179 for more info on lpd) and of course network connectivity (no firewall port blocking on 515 between the client and the server, etc...) You can use the lpget command to view the printer config. for a specific queue: # lpget 1254L8K 1254L8K: bsdaddr=faulkner,1254L8K,Solaris Use lpstat -v to show what printers are defined: # lpstat -v device for 1254L8K: /dev/1254L8K Use lpadmin to add printers to the queue. # lpadmin -p printer -s remote-system-name[!printer-name] For example you have a printer named "1159X3090HC" with an IP of 167.208.170.253. First add this printername to /etc/hosts: # echo "167.208.170.253 1159X3090HC" >> /etc/hosts Now create the print queue: # lpadmin -p 1159X3090HC -s 1159X3090HC (since 1159X3090HC is a self-contained printer and not a unix system the remote printer-name is not needed). If the printer we created is local we must "enable" it (this has no meaning if the printer is remote): # enable 1159X3090HC Now verify the new printer you have added: # lpstat -v | grep 1159X3090HC system for 1159X3090HC: 1159X3090HC Make sure you can ping the remote printer (or host): # ping 1159X3090HC 1159X3090HC is alive (note ICMP echo may be turned off at the remote host or printer for security reasons). Verify our new remote prinbter is accepting connects: # lpstat -a 1159X3090HC 1159X3090HC accepting requests since May 21 12:37 2002 Check out configuration and network connectivity: # lpstat -p 1159X3090HC -Dl printer 1159X3090HC faulted printing 1159X3090HC-0. enabled since May 21 12:49 2002. available. server 1159X3090HC not responding Description: 1159X3090HC@1159X3090HC Remote Name: 1159X3090HC Remote Server: 1159X3090HC Now notice the printer is "faulted" and also that server "1159X3090HC" is not responding. This probably means that the lpd service is not running on the printer or port 515 is blocked. Let's see if that is the case: # telnet 1159X3090HC 515 Trying 167.208.170.253... telnet: Unable to connect to remote host: Connection timed out Ok we do have a connectivity problem so this will have to be resolved first. However assuming everything has gone ok so far lets send a test page: # echo "testing" | lp -d1159X3090HC - request id is 1159X3090HC-0 (1 file) End User Printing FAQ: 1) How can I print from Command Line? Use the command lp filename, where filename is the name of a PostScript file. This will print on your default printer. To get the name of your default printer, call lpstat -d. If you want to print on another printer, use lp -d destination filename. Where destination is a valid printer queue. See item 6 on how to change or create your default printer. 2) What is a Print Request? When you print something, you create a print request. A print request is sent to a destination (a printer queue). A print request is owned by the user who created it. Every print request has an ID in the form DESTINATION-NUMBER, e.g. i22ps-13. The lp command shows the request ID when creating the print request. Use lpstat to get a list of your print requests. Beware: The request ids in the output of lpstat usually are incorrect! 3) What is a Print Queue? A print queue is a place where print requests are stored until the printer is ready to print them. The print queue usually points to a printer server (a computer to which the printer is connected via a serial or parallel interface). The printer server often is integrated into the printer. 4) What Print Queues do Exist? To get a list of all print queues available on your workstation, call lpstat -v, which shows the queue name and the printer server hostname for every queue. 5) How can I cancel a Print Request? Use the cancel request-id command, where request-id is the request ID you got when you called the lp command for printing. 6) How can I setup my default print destination? To change your default printer, define your $PRINTER environment variable. In Solaris 7+ you can also create a file in your home directory called .printers ($HOME/.printers) with the name of your default print queue. Consult "man -s 4 printers". lpstat -d show the default destination.