User Tools

Site Tools


installing_x2goprint_multi_node_debian

This is an old revision of the document!


Printing and X2go

If all your X2go servers, X2go clients and the available network printers are all on the same site (i.e. in the same office), then you will not need X2go printing. Configure your 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).

Installing X2go printing

X2go printing is intended for
  • use on low bandwith networks – like internet connections or GSM connections
  • use of printers that are directly connected to X2go (thin-)clients

X2go printing (i.e. the x2goprint command) has become a standard component of the x2goserver package (since May 2011).

For being able to use X2go printing, you'll need a running CUPS server. You can use your network's existing CUPS server or you can install a CUPS server on the same machine as the X2go server tools are running on.

By installing the X2go CUPS engine (package: cups-x2go) you add a »Virtual X2go Printer« backend to your CUPS server:

$ aptitude install cups-x2go

After the installation, you are able to add a new printer in CUPS, possibly named: »x2goprinter« (name is arbitrary). As printing device (i.e. backend) you should select the “Virtual X2go Printer” (vendor: »generic«, model: »Generic CUPS-X2GO Printer«).

You may configure further options by editing the file “/etc/cups/cups-x2go.conf” (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
#ps2pdf = /usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f "%s"

FIXME! The x2goprint command (unfortuntely still) expects an entry in /etc/sudoers. You have to add the follwing line to your sudo system by issuing the visudo command (as root). Add this line to your sudo configuration:

x2goprint ALL=(ALL) NOPASSWD: /usr/bin/x2goprint

Using X2goprint on a centralized cups server

If you would like to run X2goserver and the cups service on different machines, you'll need to generate a pair of SSH keys. Please make sure that you are logged in as user “root” on the system running the cups service and add the following folders:

# mkdirhier /root/.x2go/ssh/.x2goprint/

Now you can generate the keys:

# ssh-keygen -N "" -t dsa -f /root/.x2go/ssh/.x2goprint/id_dsa

The public part of the key (/root/.x2go/ssh/.x2goprint/id_dsa.pub) needs to be added to the x2goprint user's “authorized_keys” file on the x2goserver(s). You can do this with your favourite editor. Please make sure, that you've chosen the right user and system:

x2goprint@localhost:~$ cat id_dsa-pub >> ~/.ssh/authorized_keys

Every x2goserver running X2goprint 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. Please test if you are able to reach the x2goservers by entering the following command:

# ssh -i  /root/.x2go/ssh/.x2goprint/id_dsa x2goprint@x2goserver1
# ssh -i  /root/.x2go/ssh/.x2goprint/id_dsa x2goprint@x2goserver2
installing_x2goprint_multi_node_debian.1307451642.txt.gz · Last modified: 2013/03/08 13:31 (external edit)