Skip to content

Printer configuration

Christof Boeckler edited this page Sep 26, 2015 · 5 revisions

This page describes how to add a network printer.

Prerequisites


  • required build.conf packages
  • package lprng
  • package hpijs
  • package cups
  • package ghostscript

Configuration


  1. Create a custom package. The only files needed are etc/init.d/your_start_up_script and the corresponding rc5.d symlink.

  2. Change the name of your_start_up_script to something appropriate (printers?).

  3. Add the following line to the init) case:

     lpadmin -p "<printer_name>" -v socket://<printer_ip> -m <printer_driver> -L "<printer_location>" -E
    

<printer_name>

  • What do you want to call your printer?

<printer_ip>

  • The IP address your printer resides at. If you include package terminal in build.conf, you can see what devices are available on the client by running the following in the terminal: lpinfo -v

<printer_driver>

  • The print driver to install with the printer. If you include package terminal in build.conf, you can view available drivers for your printer on the client by running the following in the terminal: lpinfo --make-and-model '<printer_make_and_model>' -m, where <printer_make_and_model> is something like "LaserJet 4240". This will print a list of drivers like the following:

      $ lpinfo --make-and-model "LaserJet 4240" -m
      gutenprint.5.2://hp-lj_4240/expert HP LaserJet 4240 - CUPS+Gutenprint v5.2.9
      foomatic-db-compressed-ppds:0/ppd/foomatic-ppd/HP-LaserJet_4240-Postscript.ppd HP LaserJet 4240 Foomatic/Postscript
      drv:///hpcups.drv/hp-laserjet_4240-pcl3.ppd HP LaserJet 4240 pcl3, hpcups 3.13.9
      postscript-hp:0/ppd/hplip/HP/hp-laserjet_4240-ps.ppd HP LaserJet 4240 Postscript (recommended)
      postscript-hp:1/ppd/hplip/HP/hp-laserjet_4240-ps.ppd HP LaserJet 4240 Postscript (recommended)
    

    The driver is the portion of the line before the first space. E.g. gutenprint.5.2://hp-lj_4240/expert or postscript-hp:0/ppd/hplip/HP/hp-laserjet_4240-ps.ppd.

<printer_location>

  • Where is the printer located?

####Notes

  • If you include package terminal in build.conf, you can test the lpadmin command prior to adding it to your config file by running the command in the terminal on the thinstation client.
  • This is not the only way to add a network printer. Another possible method includes (on the thinstation client) adding a printer using the CUPS GUI (http://localhost:631) and creating a package from /etc/cups. This method does not require boot-time conf files.