Product Documentation

Print

Feb 26, 2018

This article provides information about printing best practices.  

Installation

The Linux VDA requires both cups and foomatic filters. Execute the following commands based on your Linux distribution:

RHEL 7 printing support

Command Copy

sudo yum –y install cups

sudo yum -y install foomatic-filters

RHEL 6 printing support

Command Copy

sudo yum –y install cups

sudo yum -y install foomatic

Usage

You can print from both published desktops and published applications. Only the client-side default printer is mapped into a Linux VDA session. The printer name must be different for desktops and applications. Consider the following:

  • For published desktops:
    CitrixUniversalPrinter:$CLIENT_NAME:dsk$SESSION_ID
  • For published applications:
    CitrixUniversalPrinter:$CLIENT_NAME:app$SESSION_ID

Note

If the same user opens both a published desktop and a published application, both printers are available to the session. Printing to a desktop printer in a published application session, or printing to an application printer in a published desktop fails.

Troubleshooting

Unable to print

There are various items to check when printing is not working correctly. The print daemon is a per-session process and must be running for the length of the session. Verify that the printing daemon is running.

Command Copy

ps –ef | grep ctxlpmngt

If the ctxlpmngt process is not running, manually start ctxlpmngt from a command line. If printing is still not working, check CUPS framework. The ctxcups service is for printer management and communicates with the Linux CUPS framework. It is a single process per machine and can be checked by:

Command Copy

service ctxcups status

Extra log when printing CUPS

As one of the components of the Linux VDA, the method of how to get the log of a printing component is similar to other components.

For RHEL, some extra steps are necessary to configure the CUPS service file. Otherwise some logs cannot get logged in hdx.lo:

Command Copy

sudo service cups stop

sudo vi /etc/systemd/system/printer.target.wants/cups.service

PrivateTmp=false

sudo service cups start

sudo systemctl daemon-reload

Note

This configuration is only for collecting the full printing log when an issue arises. Normally this configuration is not recommended because it breaks CUPS security.

Print output is garbled

An incompatible printer driver can cause garbled output. A per-user driver configuration is available and can be configured by editing the ~/.CtxlpProfile$CLIENT_NAME configuration file:

Configuration Copy

[DEFAULT_PRINTER]

printername=

model=

ppdpath=

drivertype=

Important

The printername is a field containing the name of the current client-side default printer. It is a read-only value. Do not edit it.

The fields ppdpathmodel, and drivertype cannot be set at the same time because only one takes effect for the mapped printer.

If the Universal Printer driver is not compatible with the client printer, configure the model of the native printer driver with the model= option. You can find the current model name of the printer by using the lpinfo command:

Command Copy

lpinfo –m

xerox/ph3115.ppd.gz Xerox Phaser 3115, SpliX V. 2.0.0

xerox/ph3115fr.ppd.gz Xerox Phaser 3115, SpliX V. 2.0.0

xerox/ph3115pt.ppd.gz Xerox Phaser 3115, SpliX V. 2.0.0

You can then set the model to match the printer:

Configuration Copy

Model=xerox/ph3115.ppd.gz

If the Universal Printer driver is not compatible with the client printer, configure the ppd file path of the native printer driver. The value of ppdpath is the absolute path of the native printer driver file.

For example, there is a ppd driver under /home/tester/NATIVE_PRINTER_DRIVER.ppd:

Configuration Copy

ppdpath=/home/tester/NATIVE_PRINTER_DRIVER.ppd

There are three types of Universal Printer Driver supplied by Citrix (postscript, pcl5, and pcl6). You can configure the driver type if no native printer driver is available. 

For example, if the client default printer driver type is PCL5:

Configuration Copy

drivertype=pcl5

Output size is zero

Try different types of printers. And try a virtual printer like CutePDF and PDFCreator to find out whether this issue is related to the printer driver.

The print job depends on the printer driver of the client default printer. It's important to identify the type of the current active driver type. If the client printer is using a PCL5 driver but the Linux VDA chooses a Postscript driver, an issue can occur.

If the printer driver type is correct, you can identify the problem by performing the following steps:

To identify this issue:

  1. Log on to the ICA session desktop.
  2. vi ~/.CtxlProfile$CLIENT_NAME
  3. Add the following field to the save pool file on the Linux VDA:
Configuration Copy

deletespoolfile=no

4. Log off and back on to load the configuration changes.

5. Print the document to reproduce the issue. After printing, a spool file is saved under /var/spool/cups-ctx/$logon_user/$spool_file.

6. Verify whether the spool is empty. If the spool file is zero, it represents an issue. Contact Citrix Support (and provide the printing log) for more guidance.

7. If the spool size is not zero, copy the file to the client. The spool file content depends on the printer driver type of the client default printer. If the mapped printer (native) driver is postscript, the spool file can be opened in the Linux OS directly. Verify whether the content is correct.

If the spool file is PCL, or if the client OS is Windows, copy the spool file to the client and print it by using the client-side printer. After completing this step, test it by using the other printer driver.

8. To change the mapped printer to another third-party printer driver, use the postscript client printer as an example:

a. Log on to an active session and open a browser on the client desktop.

b. Open the printing management portal:

Configuration Copy

localhost:631

b. Choose the mapped printer CitrixUniversalPrinter:$ClientName:app/dek$SESSION_ID and Modify Printer. This operation requires administrator privileges.

c. Retain the cups-ctx connection, then click Continue to change the printer driver.

d. In the Make and Model page, choose some other postscript driver instead of the Citrix UPD driver (for instance, Citrix Universal Driver Postscript). For example, if the CUPS-PDF virtual printer is installed, select the Generic CUPS-PDF Printer. Save the modification.

e. If this process succeeds, configure the ppd file path of the driver in .CtxlpProfile$CLIENT_NAME to allow the mapped printer to use this third-party driver.

Known issues

The following issues have been identified during printing on the Linux VDA:

CTXPS driver is not compatible with some PLC printers

If you encounter printing output corruption, set the printer driver to the native one provided by the manufacturer.

Slow printing performance for large documents

When you print a large document on a local client printer, the document is transferred over the server connection. On slow connections, the transfer can take a long time.

Printer and print job notifications seen from other sessions

Linux does not have the same session concept as the Windows operating system. Therefore, all users get system wide notifications. You can disable these notifications by changing the CUPS configuration file: /etc/cups/cupsd.conf.

Locate the current policy name configured in the file:

DefaultPolicy default

If the policy name is default, add the following lines to the default policy XML block:

Configuration Copy

<Policy default>

     # Job/subscription privacy...

     JobPrivateAccess default

     JobPrivateValues default

     SubscriptionPrivateAccess default

     SubscriptionPrivateValues default

     … …

     <Limit Create-Printer-Subscription>

          Require user @OWNER

          Order deny,allow

     </Limit>

     <Limit All>

          Order deny,allow

     </Limit>

</Policy>