This article provides information about printing best practices.
Installation
The Linux VDA requires both cups and foomatic filters. Run the following commands based on your Linux distribution:
RHEL 7 printing support:
sudo yum –y install cups
sudo yum -y install foomatic-filters
<!--NeedCopy-->
RHEL 6 printing support:
sudo yum –y install cups
sudo yum -y install foomatic
<!--NeedCopy-->
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.
ps –ef | grep ctxlpmngt
<!--NeedCopy-->
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:
service ctxcups status
<!--NeedCopy-->
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:
sudo service cups stop
sudo vi /etc/systemd/system/printer.target.wants/cups.service
PrivateTmp=false
sudo service cups start
sudo systemctl daemon-reload
<!--NeedCopy-->
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:
[DEFAULT_PRINTER]
printername=
model=
ppdpath=
drivertype=
<!--NeedCopy-->
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 ppdpath, model, 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:
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
<!--NeedCopy-->
You can then set the model to match the printer:
Model=xerox/ph3115.ppd.gz
<!--NeedCopy-->
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:
ppdpath=/home/tester/NATIVE_PRINTER_DRIVER.ppd
<!--NeedCopy-->
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:
drivertype=pcl5
<!--NeedCopy-->
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:
- Log on to the ICA session desktop.
- vi ~/.CtxlProfile$CLIENT_NAME
-
Add the following field to the save pool file on the Linux VDA:
deletespoolfile=no <!--NeedCopy-->
-
Log off and back on to load the configuration changes.
-
Print the document to reproduce the issue. After printing, a spool file is saved under /var/spool/cups-ctx/$logon_user/$spool_file.
-
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.
-
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.
-
To change the mapped printer to another third-party printer driver, use the postscript client printer as an example:
-
Log on to an active session and open a browser on the client desktop.
-
Open the printing management portal:
localhost:631 <!--NeedCopy-->
-
Choose the mapped printer CitrixUniversalPrinter:$ClientName:app/dek$SESSION_ID and Modify Printer. This operation requires administrator privileges.
-
Retain the cups-ctx connection, then click Continue to change the printer driver.
-
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.
-
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:
<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>
<!--NeedCopy-->