r11 - 06 Oct 2006 - 19:55:59 - AndrewZYou are here: TWiki >  Ltsp Web  > Printers

Printers attached to LTSP workstations

LTSP Supports the ability to connect up to 3 printers to an LTSP workstation.

Serial, Parallel and USB printers are supported.

Note that with LTSP-4.2, prior to update 2, there was a bug that was causing a problem with parallel printers.

If you have a version of LTSP-4.2 prior to update-2, we recommend that you update to the latest. Alternatively, you can add PRINTER_0_WRITE_ONLY = Y to the lts.conf file.

lts.conf entries

The lts.conf file is typically in /opt/ltsp/i386/etc. Entries are needed in that file, to configure which type of printer you have connected.

Serial printer


[ws001]
   PRINTER_0_TYPE     = S
   PRINTER_0_DEVICE   = /dev/ttyS0
   PRINTER_0_SPEED    = 9600

The above example says that there is a Serial printer attached to /dev/ttyS0 on workstation ws001. The baud rate is set at 9600. The parity, flow-control and Databits can also be specified. See Appendix-A below for more info.


Parallel printer


[ws002]
   PRINTER_0_TYPE     = P
   PRINTER_0_DEVICE   = /dev/lp0

The above example says that a parallel printer is attached to the first parallel port on the workstation.

If you having trouble printing in parallel printers with LTSP 4.2 add this to your entry.


PRINTER_0_WRITE_ONLY = Y


USB Printer


[ws001]
   PRINTER_0_TYPE     = U
   PRINTER_0_DEVICE   = /dev/usb/lp0

The above example says that a USB printer is attached to the workstation.

Do not forget that you may need to load the USB printer module.


   MODULE_01          = usblp


Server configuration

You then need to configure the print spooler on your server to send print jobs to the workstation printer. Whether you are using CUPS or LPRng or any other print spooler, you'll just need to tell it that the printer is attached to an HP JetDirect interface with the IP address or the hostname of the workstation.

A typical device entry in cups would be:


 socket://ws001:9100/

Assuming that your server can map the name 'ws001' to the IP address of the workstation. You could also use the IP address directly in the example above, instead of the ws001 name.

Appendix A

The following is an excerpt from the /opt/ltsp/i386/etc/lts.conf.readme file:


# Printer configuration parameters
#   Upto three printers can be connected to a diskless workstation.  A
#   combination of serial and parallel printers can be configured via the
#   following entries in the lts.conf file:
#
#  PRINTER_0_DEVICE
#     The device name of the first printer.  Names such as /dev/lp0,
#     /dev/ttyS0, or /dev/ttyS1 for serial,  or /dev/usb/lp0 for USB are allowed.
#
#  PRINTER_0_TYPE
#     The type of the printer.  Valid choices are 'P' for Parallel, 'S'
#     for serial, and 'U' for USB
#
#  PRINTER_0_PORT
#     The TCP/IP Port number to use.  By default, it will use 9100.
#
#  PRINTER_0_SPEED
#     If the printer is serial, this is the setting that will select the baud
#     rate.  By default, 9600 will be used.
#
#  PRINTER_0_FLOWCTRL
#     For serial printers, the flow control can be specified.  Either 'S' for
#     Softwre (XON/XOFF) flow control, or 'H' for Hardware (CTS/RTS) flow
#     control.  If neither is specified, 'S' will be used.
#
#  PRINTER_0_PARITY
#     For serial printers, the parity can be specified.  The choices are:
#     'E'-Even, 'O'-Odd or 'N'-None.  If not specified, 'N' will be used.
#
#  PRINTER_0_DATABITS
#     For serial printers, the number of data bits can be specified.  The
#     choices are: '5', '6', '7' and '8'.  If not specified, '8' will be used.
#
#  PRINTER_0_WRITE_ONLY
#     Some printers will detect that the port is read-write, and expect
#     to be able to send feedback.  Setting the port to WRITE-ONLY will
#     make it so that the printer doesn't detect that.  If not
#     specified 'N' will be used.
#
# Settings for a 2nd printer.  See the descriptions for the first printer.
#  PRINTER_1_DEVICE
#  PRINTER_1_TYPE
#  PRINTER_1_PORT       Defaults to 9101
#  PRINTER_1_SPEED
#  PRINTER_1_FLOWCTRL
#  PRINTER_1_PARITY
#  PRINTER_1_DATABITS
#  PRINTER_1_WRITE_ONLY
#
# Settings for a 3rd printer.  See the descriptions for the first printer.
#  PRINTER_2_DEVICE
#  PRINTER_2_TYPE
#  PRINTER_2_PORT       Defaults to 9102
#  PRINTER_2_SPEED
#  PRINTER_2_FLOWCTRL
#  PRINTER_2_PARITY
#  PRINTER_2_DATABITS
#  PRINTER_2_WRITE_ONLY
#

Setting a Default Printer on a Per User Basis

Sometimes it is useful to set a default printer for each user. This is how it can be accomplished.

First log in as the user you want to set the default printer for. Open the /etc/cups/lpoptions file with a text editor. It will open as "read only" chose "save as" and save it as .lpoptions (the leading period is a necessary part of the file name) into the user's home directory. Then modify it by designating the appropriate printer as Default, remove Default from the printer that used to be the Default printer and label it Dest instead of Default.

When you are finished with the file you should only have one printer labeled as Default.

Save the file, and you should have a default printer for that user which will be active upon the user's next login.

This is what my /home/aaron/.lpoptions files looked like after I modified it:


Default ws004 cpi=12 lpi=7 page-bottom=86 page-left=57 page-right=57 page-top=72 scaling=100 wrap=true
Dest ws005 cpi=12 lpi=7 page-bottom=86 page-left=57 page-right=57 page-top=72 scaling=100 wrap=true
Dest ws006 cpi=12 lpi=7 page-bottom=86 page-left=57 page-right=57 page-top=72 scaling=100 wrap=true
Special Advanced%20Faxing%20Tool%20(ksendfax)
Special Mail%20PDF%20File
Special Print%20to%20File%20(PDF)
Special Print%20to%20File%20(PostScript)
Special Send%20to%20Fax

-- AaronFeldman - 19 Oct 2005

For other methods, see ManagingUserConfiguration.

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r11 < r10 < r9 < r8 < r7 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback