[FreeNX-kNX] Printing and Cups client

Alastair Johnson alastair at solutiontrax.com
Mon Oct 16 16:49:20 UTC 2006


On the client:
In the 'Advanced' tab tick 'Enable SSL encryption of all traffic'
In the 'Services' tab tick 'Enable CUPS printing'. Set the port to the CUPS 
port on the client (usually the default, 631) then click the 'Add' button.
From the 'Resource' dropdown select the printer you want to use, and set 
the 'Access Control' radio button to 'Private Printer' if you want it usable 
only by this client, or 'Public Printer' of you want other users on the 
server to be able to share this printer.

On the server:
Install the nomachine nxclient (may not be needed, but works better for me 
than the included nxclient script for printer driver choice)
Make sure you're using CUPS 1.1.x not 1.2.x
In /etc/nxserver/node.conf set ENABLE_KDE_CUPS="1". You may also need to set 
KDE_PRINTRC and CUPS_ETC but the defaults have worked for me.
You also need to modify /usr/bin/nxnode function cmd_node_addprinter() to 
include the username and password when setting up the CUPS printer, and 
change the host from localhost to the hostname or IP address. Change the 
line:
        DEVICE_URI="ipp://localhost:$port/printers/$printer"
to:
        DEVICE_URI="ipp://$username:$password@your_hostname_here:
$port/printers/$printer"
I _think_ the change from localhost to actual hostname is needed because CUPS 
uses token-based authentication for localhost instead of the usual 
challenge-response methods. Normally this is fine, but since we are 
port-forwarding to a non-local cups we need the challenge-response, so we 
need something that resolves to the local machine but isn't localhost (or 
127.0.0.1 for that matter)

Now when you connect from the client to the server you should be prompted to 
select the printer driver for your printer. The list is of available drivers 
on the server, and includes default CUPS drivers but not foomatic or other 
drivers. The safest option is the 'Raw' driver which will send the whole 
print job to the client and use the driver on the client for printing. If you 
now go to the kde printing control panel in your NX session you should see 
your shared printer, and print a test page (or anything else for that matter) 
to it.

On Monday 16 October 2006 16:31, Marcel kraan wrote:
> I have a server at the internet provider
> the client is in a private network (192.x.x.x)
>
> cups is running on the client and working.
> cups is running also on the server.
>
> i try to connect the printer to the remote client?
>
> ?how? what do i fill in in the host/port section?   127.0.0.1? but what
> port?




More information about the FreeNX-kNX mailing list