This is an old revision of the document!
If all your X2Go servers, X2Go clients and the available network printers are all on the same site (i.e. in the same office) and you neither intend to provide mobile or home office desktop environments, then you will not need X2Go printing.
Configure your central print server (mostly CUPS, Common Unix Printing System) to print directly to your office printers. Also make sure that your office printers are available to user's that logon to your X2Go server (setting up CUPS printers is not an issue of X2go, please consult the CUPS howtos available on the internet).
If you would like to run your X2Go server and the CUPS service on different machines (such a scenario is very common if you run more than one X2Go server on your network), you'll have to do things:
Please make sure that you are logged in as user
root on the system running the CUPS service and add the following folders:
$ mkdir -p /root/.ssh/
Now you can generate the keys (on each X2go server that shall have access to the CUPS service):
$ ssh-keygen -N "" -t dsa -f /root/.ssh/id_dsa-x2goprint
The public part of the key (
/root/.ssh/id_dsa-x2goprint.pub) needs to be added to the
authorized_keys file on each of your X2go servers. You can use the
ssh-copy-id command for that:
root@cupsserver:~$ ssh-copy-id /root.ssh/id_dsa-x2goprint x2goprint@x2goserver1 root@cupsserver:~$ ssh-copy-id /root.ssh/id_dsa-x2goprint x2goprint@x2goserver2 etc.
Every X2Go server that uses X2Go printing needs to be known by the CUPS server. Regarding your name resolution type, you'll need to add the host names for example to the local /etc/hosts file (your even better: use your local DNS server!!!). Please test if you are able to build up SSH connections from your CUPS server to your X2go servers by entering the following command:
root@cupsserver:~$ ssh -i /root/.ssh/id_dsa-x2goprint x2goprint@x2goserver1 root@cupsserver:~$ ssh -i /root/.ssh/id_dsa-x2goprint x2goprint@x2goserver2 etc.
At last, you have to add the following line to your /etc/sudoers file. Normally the command
visudo is highly recommended for editing the sudoers file, as it performs sanity checks on the sudoers file and reports if you made a mistake while editing the file.
x2goprint ALL=(ALL) NOPASSWD: /usr/bin/x2goprint