[FreeNX-kNX] Client-side CUPS printing

Alastair Johnson alastair at solutiontrax.com
Mon Nov 5 18:53:48 UTC 2007


On Monday 05 November 2007, Prakash Velayutham wrote:

First a disclaimer - I haven't looked at the printing code since Fabian fixed 
it up (v0.6.99?) so this may be out of date. I'm sure Fabian will correct me 
if I get it wrong ;-) It's also subject to dodgy memory, so it may be worth 
checking the archives for earlier explanations. Beware - it took me a while 
to work out what printing was doing back then, so later posts are probably 
more accurate than earlier ones!

> I have inserted some nxclient dialogs in the server side nxnode script
> to print out the password (in the addprinter function), and even with
> that password, it keeps failing authentication to connect to the
> printer. Do you know what is going wrong in this case?

It may be the URL you use to reference the printer. Back with CUPS 1.1 if you 
used localhost in the URL it would try local token-based authentication which 
would fail because the server was actually at a remote location with a 
forwarded port. Using the server's external IP in the URL instead of 
localhost would make it use the network-style authentication which would 
work.

It may also be worth trying to connect to it at the client end - the username 
and password should be the same but you'll be at the other end of the tunnel.

> Also, earlier, I used to see a process running as nxipp://... in the
> server-side, but I don't see it now. Does this get started only when I
> submit a print job or does it always keep running?

Don't know. The nxipp:// notation's a new one on me, but I see it in the 
DEVICE_URI in nxnode. It may be a fix for the old issue noted above.

> I really hope to get this to work. As soon as I get this to work, I
> intend to write up a document on the different steps on getting this
> to work flawlessly, so it can help others.

I thought we had got to that stage with 0.7.0 :-( Then again I haven't been 
using print forwarding for a while. The document would be good - I never got 
further than some long posts to the list myself.

> I am also trying it from Windows clients (printer sharing), and have
> some issues to iron out there too. Should I start a separate thread
> for that (as it is not CUPS) or is this thread good for that too?

A new thread may be easier for people searching in future, but the issues may 
be the same. There's no right answer to this one :-) Oh, and I've never tried 
the Windows client...

> Thanks as always,
> Prakash
>
> On Nov 5, 2007, at 9:06 AM, Alastair Johnson wrote:
> > On Monday 05 November 2007, Prakash Velayutham wrote:
> >> Hello Fabian,
> >>
> >> Which port numbers get opened on the server and client-side for
> >> printing?
> >
> > Many and varied ;-) This may have changed since I last looked at it,
> > but IIRC
> > it's:
> > Client port 631 - your existing local CUPS
> > Client port 20000ish, cupsd started by nxclient on the client, port
> > forwarded
> > to 2000+display (usually 3000ish) on the server
> > Server port 9000+display (usually 10000ish) cupsd on server started
> > by nxnode
> > in response to client's addprinter request
> >
> > This was back with 1.5 series clients, and before Fabian updated the
> > printing,
> > but it looks valid from a quick glance at node.conf
> >
> >> Now I see that a cups daemon starts up on the client-side with 20000
> >> port. But on the server side, I am not positive what port I should
> >> check for, and how the printers should be checked and configured.
> >>
> >> Based on some other thread, I changed my CUPS printing configuration
> >> on the server-side to listen to localhost:3000 and that asks me for a
> >> username/password now. I am giving my client-side username/password
> >> there, but it keeps coming back with the same dialog over and over.
> >> Could you please explain how that is to be done?
> >
> > IIRC, and if it hasn't changed, port 3000 on the server is a tunnel
> > to a cupsd
> > on the client started by nxclient. It uses a random password that's
> > announced
> > to the server in the session setup but doesn't usually find its way
> > into the
> > logs. Check the $password variable in node_cmd_addprinter in the
> > nxnode
> > script.
> >
> >> Thanks,
> >> Prakash
> >>
> >> On Nov 4, 2007, at 9:53 AM, Fabian Franz wrote:
> >>>> This link says officially "RunAsUser" support was removed in 1.2.
> >>>> Isn't this the option that enables usermode cupsd? Or am I
> >>>> confused?
> >>>
> >>> Nope, you are confused ;-).
> >>>
> >>> RunAsUser is an option to have cupsd running as root be run as
> >>> another user like lp as far as I understood.
> >>>
> >>>> Regardless, I have changed the NXClient CUPS daemon location
> >>>> (thanks
> >>>> for the pointer) to the wrapper script, but when I start up the
> >>>> connection, it still complains with "cupsd: Child exited with
> >>>> status
> >>>> 127".
> >>>
> >>> Hm, strange. I dunno what this means, but you can startup the cupsd-
> >>> wrapper script yourself with the cupsd.conf:
> >>>
> >>> ./nxcupsd-wrapper -c $HOME/.nx/cups/cupsd.conf
> >>>
> >>> You can also find log files in that directory, that could give you
> >>> additional pointers.
> >>>
> >>> cu
> >>>
> >>> Fabian




More information about the FreeNX-kNX mailing list