Linux Virtual Delivery Agent 2110

Print

This article provides information about printing best practices.  

Installation

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-->

Configuration

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:

  1. Select the Printer driver mapping and compatibility policy.
  2. Click Add.
  3. 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.
  4. Choose Replace with and type in the absolute path of the driver file on the VDA.

    image of printer driver mapping and compatibility policy

Note:

  • Only PPD driver files are supported.
  • Other options of the Printer driver mapping and compatibility policy are not supported. Only Replace with takes effect.

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 names are different for desktops and applications:

  • 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 on a desktop printer in a published application session, or printing on an application printer in a published desktop fails.

Troubleshooting

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-->

Note:

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.

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 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:

     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 based on your printer properties.

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

     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:

  1. Log on to a published desktop session.
  2. Run the vi ~/.CtxlpProfile$CLIENT_NAME command.
  3. Add the following field to save the spool file on the Linux VDA:

    deletespoolfile=no
    <!--NeedCopy-->
    
  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. 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.

  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. 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.

  8. Change the mapped printer to use a different printer driver. The following example uses the postscript client printer as an example:

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

    2. Open the printing management portal:

      localhost:631
      <!--NeedCopy-->
      
    3. Choose the mapped printer CitrixUniversalPrinter:$ClientName:app/dsk$SESSION_ID and Modify Printer. This operation requires administrator privileges.

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

    5. 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.

    6. 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.

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-->
Print