[FreeNX-kNX] Printing and Cups client

Alastair Johnson alastair at solutiontrax.com
Tue Oct 17 16:41:13 UTC 2006


Comments inline...
On Tuesday 17 October 2006 14:58, Marcel kraan wrote:
> Thank you very much for the config...
>
> Iam working for 3 weks on the printer and still nothing..
It took me at least that long to work out what it was doing :-) You'll be able 
to see the number of wrong turns I took if you search the list archives...
>
> CLIENT: (192.168.0.2 where the real printer is)
> - I have configured the printer local with cups 1.1.20 and it's working
> (LOCAL)
>
> root at term1 ~]# cat /etc/cups/printers.conf
> <DefaultPrinter hp940c>
> DeviceURI parallel:/dev/lp0
> Location
> Info
> State Idle
> Accepting Yes
> JobSheets none none
> QuotaPeriod 0
> PageLimit 0
> KLimit 0
> </Printer>
>
> - i have installed the default foonmatic-hpijs driver for the printer. (but
> in printers.conf it's RAW) (?) - i have selected the printer in the
> nxclient at services.
> Enable cups printing  port 631  (yes)
> Selected the printer 'hp940c'
Sounds good. So long as you can print to it as the same user that's running 
the nxclient that's fine.
>
> SERVER:
> I have downgraded cups had an error on the new DBUS so i upgrade DBUS.
> After a vew softlinks, cups 1.1.20 was working
>
> I have installed also nxclient from nomachine
>
> i have changed in /etc/nxserver/node.conf
> ENABLE_KDE_CUPS="1"
> KDE_PRINTRC="$HOME/.kde/share/config/kdeprintrc"
> CUPS_ETC="/etc/cups"
You should probably leave the KDE_PRINTRC and CUPS_ETC commented here unless 
you know they should be different.
>
> and also in /usr/bin/nxloadconfig
> ENABLE_KDE_CUPS="1"
> KDE_PRINTRC="" # Calculated
> #KDE_PRINTRC="$KDEHOME/.kde/share/config/kdeprintrc";
> CUPS_ETC="/etc/cups/"
You don't need to change anything in this file. It sets the default values 
which will be overridden by any values set in /etc/nxserver/node.conf
>
>
> /usr/bin/nxnode
> DEVICE_URI="ipp://www.serverhostname.nl:$port/printers/$printer"
This should be:
DEVICE_URI="ipp://$username:$password@www.serverhostname.nl:
$port/printers/$printer"
The username and password are required for authentication.
>
>
> I never had any popup for a printer selection.
Curious...do you get a small dialog titled "NX" saying "unknown 
parameter: 'noautokill'"? If you did then remove the '-noautokill' option 
from this line in nxnode function cmd_node_addprinter():
MODEL=$($PATH_BIN/nxclient -printer "$NAME" -noautokill -display :$display)

> The printer is also not in the printers.conf on the server.
It won't appear in the main printers.conf as it starts a new cupsd as the 
user, listening on a nonstandard port. The line you changed above creates a 
new printer on the new cupsd not the main system cupsd. 
> Also i have no environment with KDE_HOME and KDE_PRINTRC after loggin in to
> the server,
That probably isn't a problem. The environment you see will be your normal 
one, but the environment nxnode sees probably has these.
>
> If someone wants to have access to the server this is no problem for me.
>
> Please help :-)
I'm trying :-) but it's somewhat (overly?) complicated and I haven't looked at 
it for a while. I'm posting what I know to the wiki now (possibly not all at 
once...
>
> Alastair Johnson wrote:
> > 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?
> >
> > ________________________________________________________________
> >      Were you helped on this list with your FreeNX problem?
> >     Then please write up the solution in the FreeNX Wiki/FAQ:
> >   http://openfacts.berlios.de/index-en.phtml?title=FreeNX_FAQ
> >          Don't forget to check the NX Knowledge Base:
> >                  http://www.nomachine.com/kb/
> >
> > ________________________________________________________________
> >        FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
> >       https://mail.kde.org/mailman/listinfo/freenx-knx
> > ________________________________________________________________




More information about the FreeNX-kNX mailing list