Skip past navigation linksSecure Global Desktop 4.40 Administration Guide > Printing > Printing From a UNIX or Linux System Application Server

Printing From a UNIX or Linux System Application Server

To print from a UNIX or Linux system application server, you have to install at least one SGD printer queue on the application server. This printer queue redirects print jobs to an SGD server and the SGD sends the print jobs to the client device. If your array contains more than one SGD server, you install a printer queue for each SGD server in the array.

You configure printer queues with the SGD printer queue installation script. This script also installs replacement lp or lpr scripts. These are used instead of the standard scripts to ensure that print jobs contain enough information for SGD to be able to identify the user who printed them.

Installing an SGD Printer Queue on the Application Server

  1. Copy the /opt/tarantella/bin/scripts/prtinstall.en.sh script from an SGD server to a temporary directory on the application server.
  2. Log in to the application server as superuser (root).
  3. Change to the temporary directory.
  4. Run the script to install the printer queue.

    See the SGD printer queue installation script for details of all the command options.

    If the array consists of a single SGD server, use the following command:

    Skip past command syntax or program code# sh prtinstall.en.sh

    When prompted, type the full DNS name of the SGD server.

    If the array contains more than one SGD server, create a printer queue for each SGD server in the array. Use the following command:

    Skip past command syntax or program code# sh prtinstall.en.sh --ttahost DNS_name --appprinter name

    The DNS_name is the full DNS name of an SGD server. The name of each printer queue (as specified by the --appprinter argument) can be anything you like but it must be unique.

    If you use the Common UNIX Printing System (CUPS), you might have to use the --cups option to indicate that you are using CUPS. You might also have Configuring Printing for CUPS.

    If you use the SGD server as an application server, a printer queue is automatically created when you install the software.

Configuring Printing for CUPS

SGD printing only works with CUPS version 1.1.19 or later. The following configuration changes might needed to enable printing with CUPS:

Note After making changes to your CUPS configuration, you might have to restart the CUPS daemon.

To use CUPS for printing, users must use the /opt/tarantella/bin/lp script.

How to Print With the SGD lp and lpr Scripts

The prtinstall.en.sh script also installs the SGD lp or lpr replacement scripts. Users must use these scripts when they print from a UNIX or Linux system application server to ensure that print jobs contain enough information for SGD to be able to identify the user who printed them.

The SGD login scripts set the user's PATH to ensure that the replacement scripts take precedence over the system scripts. However, if the application uses a full path name, for example /usr/bin/lp, or modifies PATH itself, you must reconfigure the application to use /opt/tarantella/bin/lp or /opt/tarantella/bin/lpr.

Users print with the replacement scripts as follows:

Skip past command syntax or program code$ lp -d printer file
$ lpr -P printer file

If the -d or -P argument is omitted, the output goes to the client's default printer.

How you specify the printer depends on the client device.

Note An alternative to the configuration described below is to use SGD PDF printing.

Printing to a Microsoft Windows Client Device

When printing to a Microsoft Windows client device, users can specify the printer they print to by using any of the following:

To use a UNC name, you must enclose the printer name in quotes and escape every backslash with an extra backslash (see the example above). As different shells process backslashes differently, you might need to experiment with the number of backslashes. Users can also use underscores instead of backslashes, for example:

Skip past command syntax or program code$ lp -d __PRTSERVER_HPLJ5 filename

Note Using underscores only works if the first two characters of the printer name are underscores.

You can avoid problems with UNC names by using a "friendly" name. You configure "friendly" names in the /opt/tarantella/etc/data/printernamemap.txt file. The entries in this file map "friendly" names to UNC names, for example:

Skip past preformatted text"label-printer"="\\PRTSERVER\HPLJ5"

Note You do not have to escape any backslashes.

Printing to a UNIX, Linux, or Mac OS X System Client Device

When printing to a UNIX, Linux or Mac OS X system client device, users can specify any printer listed in the [UNIX] section of either of the following files:

The following are examples of print commands:

Skip past command syntax or program code$ lp -d A4-printer filename
$ lpr -P color-printer filename

See Configuring Printing for UNIX, Linux and Mac OS X System Client Devices for details of how to configure printer names.

Related Topics