User Tools

Site Tools


This is an old revision of the document!

Printing Revisited

Sites where X2Go Printing does not Make Sense

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.

Connect all your office printers directly to the network (IPP, LPD, AppJetDirect printing). Configure your central print server (mostly CUPS, Common Unix Printing System) to print directly to your networked office printers. Also make sure that your office printers are available to users 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).

Using X2Go Printing on a Centralized CUPS Server

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:

  1. generate a pair of SSH keys to faciliate communication between those two machines
  2. add a line to the /etc/sudoers file on every X2go server that shall be able to accept print jobs from the central CUPS server

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/ needs to be added to the x2goprint user's 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

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

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
wiki/advanced/multi-node/x2goserver-printing.1321109066.txt.gz · Last modified: 2013/03/08 13:31 (external edit)