You may experience an issue printing under Fedora 17 onwards, or from CentOS 7 or RHEL 7. The printer appears in the CUPS list and is available from the print menu (though it has a status of "/usr/lib/cups/backend/vnc failed"), but very quickly after a message saying the document is printing, another appears saying it has been aborted.
This issue has two potential causes: SELinux, and PrivateTmp.
First, upgrade to VNC 5.3.1+. If you are using Red Hat-compatible Linux and SELinux is enabled during your upgrade, the VNC policy modules used to fix this issue are registered automatically (if SELinux is enabled after you upgrade, run
vncinitconfig -register-SELinux to register the policy modules manually). If you are using Debian-compatible Linux, you must register the policy modules manually.
Note: VNC policy modules cannot be registered on versions of CentOS/RHEL earlier than 5.0.
If your issue persists, it may be due to the "PrivateTmp" security feature introduced in Fedora 17, which can be enabled on a per-service basis. As the name suggests, services running with this enabled have a private
/tmp directory which is not shared with other processes. The CUPS service has this feature enabled by default, which explains why it cannot connect to the VNC Server printing socket in
/tmp. PrivateTmp must be disabled for CUPS for the VNC CUPS driver to work.
- Copy the file
/lib/systemd/system/cups.service to /etc/systemd/system/cups.serviceto create a local copy that won't be reverted by package updates.
/etc/systemd/system/cups.serviceby commenting out the line
PrivateTmp=truewith a hash sign.
systemctl daemon-reload; systemctl restart cups.service