Xlpd Tutorial

Remote printer configuration: Solaris

Last modified: Tuesday, November 11, 2014 10:25 PM

Run admintool at the console and follow the procedures to register a remote printer.
This section explains setup procedures for each Solaris version. For a detailed explanation on how to set up a printer for a particular Solaris version, refer to its system manual.
Solaris 2.6, 2.7, 8, 9, 10
  1. Run /usr/bin/admintool as root user.
  2. Click Browse -> Printers in the menu.
  3. Click Add -> Access to Printer in the Edit menu.
  4. In the print setup window, enter the followings.

    • Printer Name: printer name to be used on the print command line (printer_name). This is also used as queue name. In order to use the queue registered in Xlpd, this name should be exactly match the registered queue name in Xlpd. If this name is not already registered in Xlpd and a print job is sent to Xlpd using this queue, then Xlpd will print the job using its default queue or create a new queue automatically depending on the Xlpd settings.
    • Print Server: IP address or hostname of the PC where Xlpd is installed. The IP address may not be accepted, then the hostname should be registered in /etc/hosts file as explained in General setup.
    • Description: comments on printer model or other useful information. This is not used on the print command line.
    • Option - Default Printer: This option must be selected if you want this printer to be the default printer for the print command. If you do not define a printer when giving the print command, system uses the default printer.
  5. Click OK to exit admintool.
  6. To print a file on Solaris system, use the following command line.
    $ /usr/ucb/lpr -PPrinter_name filename
Solaris 2.5
  1. Run admintool as root user.
  2. Click Browse -> Printers in the menu.
  3. Click Add in the Edit menu.
  4. Click Access to Printer in the Add submenu.
  5. In the Printer Server, enter the PC's hostname or IP address.
  6. Select BSD.
  7. Restart hclnfsd or bwnfsd.
    # ps -ef | egrep '(bwnfsd|hclnfsd)'
    # kill -1 $PID
    * $PID is a process ID of running bwnfsd or hclnfsd.

Solaris 2.4, Solaris 2.3
  1. Run admintool as root user.
  2. Select Printer Manager.
  3. Click Edit -> Add Printer in the menu.
  4. In the Printer Server, enter the PC's hostname or IP address.
  5. Select BSD.
  6. Restart hclnfsd or bwnfsd.
    # ps -ef | egrep '(bwnfsd|hclnfsd)'
    # kill -1 $PID
    * $PID is a process ID of running bwnfsd or hclnfsd.

Printer setup in Solaris 2.x command Line

In the Queuename option, enter the name of queue registered in Xlpd. If this name is not already registered in Xlpd and a print job is sent to Xlpd using this queue, then Xlpd will print the job using its default queue or create a new queue automatically depending on the Xlpd settings.

  1. Login as root user.
  2. Identify the print server system to a bsd system with the following command.
    # lpsystem -t bsd pcname
  3. Register print queue and printer server system.
    # lpadmin -p Queuename -s pcname
  4. Begin accepting (queuing) print request on the new print queue.
    # accept Queuename
  5. Get ready to receive print request on the new print queue.
    # enable Queuename
  6. Test print queue.
    # /usr/ucb/lpq -P Queuename
  7. Test-print with the following command.
    # lpr -P Queuename samplefile