For being able to use X2Go printing, you'll need a running CUPS server. You can use your network's existing CUPS server (multi-node X2Go printing, see below) or you can install a CUPS server on the same machine as the X2Go Server tools are running on (single-node X2Go printing setup).
For other scenarios, please use a central CUPS server (see multi-node printing below) without the X2Go printing feature installed.
X2Go Printing falls into two components:
Before you begin!
This page is targeted at people who use Debian/Raspbian/Ubuntu packages provided by the X2Go project. Please make sure that you have added the X2Go repository to your package management system. The required steps are described here: Debian, Raspbian or Ubuntu (depending on the distro that you have chosen for your X2Go Server).
The minimal X2Go Server + CUPS setup is: install
cups-x2go on the same machine.
$ sudo aptitude install x2goserver x2goserver-printing cups cups-x2go
Printing works nearly out of the box, you only have to add a virtual CUPS queue based on the Virtual X2Go Printer (
PrivateTmp directive is set to true in the CUPS systemd service file. Please make sure to disable this option manually and to restart CUPS for
cups-x2go to work.
The X2Go server-side printing component contains the script
x2goprint which looks for incoming
cups-x2go backend print jobs and processes them towards connected X2Go Clients. It is an X2Go Server add-on included in the X2Go server source project. Debian/Raspbian/Ubuntu users have to install the extra package with the following command:
$ sudo aptitude install x2goserver-printing
Note, that on older systems, X2Go printing requires the user(s) to be added to the fuse group on the server, as it uses the file and folder sharing feature to transfer the spool file to the client. If your distribution is not providing a fuse group any longer, this does not apply.
For single-node X2Go printing (means: all steps of the printing process take place on the same machine) only one further step for setting up X2Go printing is necessary: after installing the X2Go CUPS engine (package:
cups-x2go) you have to add a »Virtual X2Go Printer« backend to your CUPS server.
$ sudo aptitude install cups-x2go
You may configure further options by editing the CUPS-X2Go config file
/etc/cups/cups-x2go.conf, but this should normally not be necessary. The below code block shows the default set of options:
## ## cups-x2go.conf -- CUPS Backend Configuration ## ## Server with X2Go system #x2goserver = local ## dsa key for user x2goprint #printdsa = /root/.x2go/ssh/.x2goprint/id_dsa ## command to generate pdf files ## CAUTION: this command MUST output the resulting PDF File to standard output. #ps2pdf = /usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=- -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -dDoNumCopies -c .setpdfwrite -f \"%s\" ## loglevel for cups-x2go, possible values: emerg, alert, crit, err, warn, notice, info, debug #loglevel = notice
For an X2Go setup where X2Go server and CUPS server are hosted on different machines, please refer to the Multi-Node X2Go Printing setup.