This page is specific to Ubuntu versions 12.04, 14.04

Do you have office environment where you need to configure local/network printers for different thin/fat clients or you have the clients in different network segments (e.x. clients boot over http with iPXE)? Setup local or network printer on clients.

Install printing support in the LTSP clients

Before you start, prepare printer models device names/ip address and drivers.

  1. Add printing support and printer drivers in chroot sudo chroot /opt/ltsp/i386 apt-get install cups
  2. Install printing applications in chroot
  3. Enable cups service in live thin client sessions (lts.conf)

    The CUPS_SERVER=localhost and KEEP_SYSTEM_SERVICES=cups will do the local printing support in chroot. With these settings users can access local printers (cups = localhost) and only chroot lpadmin group users can add new printers.

    KEEP_SYSTEM_SERVICES enables the system services that thin clients can run in their sessions:

     # Remove some system services that don't make sense in live sessions.
     # The user can add more items by declaring space separated RM_SYSTEM_SERVICES
     # or RM_THIN_SYSTEM_SERVICES lists in lts.conf. The RM_THIN_SYSTEM_SERVICES list
     # is ignored by fat clients.
     # KEEP_SYSTEM_SERVICES is a space separated whitelist of services.

  • How is the cups server set up after boot when screen session is LDM?
    If desktop/screen session is LDM, the normal init directory /etc/init.d/ RC scripts are ignored and all the init scripts in chroot directory /usr/share/ldm/rc.d/* are executed as init scripts. When users login from LDM session the init scripts check first is the cups installed in chroot and after that sets up CUPS_SERVER (default from LDM_SERVER). In last steps it finds all the printers and writes cups configuration. For more information see Ubuntu LTSP documentation lts.conf or see chroot /etc/cupsd.conf

Change CUPS setup on the local client

  1. Cups configuration can be accessed with browser in localhost:631

    For printer configuration in cups you need to have one lpadmin group user in chroot: (enable root user in chroot, not recommended) (enable admin user to group lpadmin in chroot, recommended) (chroot admin account instructions need to be checked, because there usually sshd is not installed in chroot)

    After the printer is configured, the configuration settings are saved in file printer.conf.

  2. The configuration file printer.conf is recommended to be stored in a) cups user profile or c) fetched from a remote server when user logins. Having configuration in cups user profile or fetching remotely in login script administrators don't have to update the chroot image everytime the printer configuration is changed. For remote management admins need remote access to client to setup any new printer settings in cups configuration. There is also a less client secure alternative - after changing printer settings locally/remotely administrator updates the cups information manually in one common printer.conf which is maintained and added in the chroot for all clients.
  3. Users select the printer manually from the printer settings or user can get the default from profile (scripting ?)

    Cups user configurations allow setting the printing preferences in user profile ~/.cups/client.conf and it's also possible to configure the settings for a single program like this

     CUPS_SERVER=server:port firefox
     ServerName server:port

Virtual Printing

  • If you want to print something from a thin client (running LTSP server apps) to other clients local printer (possibly also behind NAT/firewall) you need to setup the printing to a shared spool directory on server. Then on one of the clients chroot installed crontab/printer app fetches the documents from the server and prints them locally.

UbuntuLTSP/localprinter (last edited 2015-04-08 20:23:02 by vsuojanen)