Printing best practices
This article provides information about printing best practices.
The Linux VDA requires both cups and foomatic filters. The filters are installed when you install the VDA. You can also install the filters manually based on the distribution. For example:
On RHEL 7:
sudo yum –y install cups sudo yum -y install foomatic-filters <!--NeedCopy-->
On RHEL 6:
sudo yum –y install cups sudo yum -y install foomatic <!--NeedCopy-->
There are three types of Universal Printer Driver supplied by Citrix (postscript, pcl5, and pcl6). However, the Universal Printer Driver might not be compatible with your client printer. In this case, your only option in earlier releases was to edit the ~/.CtxlpProfile$CLIENT_NAME configuration file. Starting with Version 1906, you can choose to configure the Printer driver mapping and compatibility policy in Citrix Studio instead.
To configure the Printer driver mapping and compatibility policy in Citrix Studio:
- Select the Printer driver mapping and compatibility policy.
- Click Add.
- Fill in Driver name with the driver name of the client printer. If you are using Citrix Workspace app for Linux, fill in the printer name instead.
Choose Replace with and type in the absolute path of the driver file on the VDA.
- Only PPD driver files are supported.
- Other options of the Printer driver mapping and compatibility policy are not supported. Only Replace with takes effect.
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 names are different for desktops and applications:
For published desktops:
For published applications:
If the same user opens both a published desktop and a published application, both printers are available to the session. Printing on a desktop printer in a published application session, or printing on an application printer in a published desktop fails.
Unable to print
When printing is not working correctly, check the print daemon, ctxlpmngt, and the CUPs framework.
The print daemon, ctxlpmngt, is a per-session process and must be running for the length of the session. Run the following command to verify that the printing daemon is running. If ctxlpmngt is not running, start ctxlpmngt manually from a command line.
ps –ef | grep ctxlpmngt <!--NeedCopy-->
If printing is still not working, check the CUPS framework. The ctxcups service is used for printer management and communicates with the Linux CUPS framework. It is a single process per machine and can be checked by running the following command:
service ctxcups status <!--NeedCopy-->
Extra steps for collecting CUPS logs
To collect CUPS logs, run the following commands to configure the CUPS service file. Otherwise, CUPS logs cannot be recorded in hdx.log:
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-->
This configuration is made only for collecting the full printing log when an issue arises. Under normal circumstances, 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-->
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 using 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:
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:
There are three types of Universal Printer Driver supplied by Citrix (postscript, pcl5, and pcl6). You can configure the driver type based on your printer properties.
For example, if the client default printer driver type is PCL5, set drivertype to:
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:
- Log on to a published desktop session.
- Run the vi ~/.CtxlpProfile$CLIENT_NAME command.
Add the following field to save the spool file on the Linux VDA:
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.
Check 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. Check 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 on the client-side printer by using a different printer driver.
Change the mapped printer to use a different printer driver. The following example uses 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:
Choose the mapped printer CitrixUniversalPrinter:$ClientName:app/dsk$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 fields, choose a different printer driver from the Citrix UPD driver. For example, if the CUPS-PDF virtual printer is installed, select the Generic CUPS-PDF Printer driver. Save the change.
If this process succeeds, configure the PPD file path of the driver in .CtxlpProfile$CLIENT_NAME to allow the mapped printer to use the newly selected driver.
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:
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-->