[FreeNX-kNX] how printing works

ChrisB chris at ccburton.com
Tue Sep 29 10:54:19 UTC 2009


Antoine Martin <antoine at nagafix.co.uk> wrote on 29/09/2009 09:39:21:

> Hi,
> 
> I am trying to figure out how NX does the printer forwarding.

Well . . .

It uses an ssh tunnel which redirects a port on the FreeNX server back to 
the workstation, so you can then connect to a port on the WS :631 or :445, 
via the redirected port.


> How does it tell the client sessions to connect to a different printer
> on the fly when the client connects from a different location?


FreeNX runs a separate cups printer daemon for each user, which it 
configures with the printer/queue identified by  . . .

1/ the printer name on the workstation, as configured on the workstation 
cups daemon if the workstation is NIX or the printer share if the WS is 
windows
2/ the port on the server which is redirected to the workstation, via 
which the user cupsd spools
3/ the printer/share name and the login details ( for connecting back to 
the workstation ) which are set up in the NX client, and passed over 
during connection
4/ a .ppd driver file to correspond to the printer's MODEL, which FreeNX 
asks the user to select because it can't (well, doesn't anyway) tell just 
from the printer name.


> Can it be done/is it done without samba?
> 


Samba (smb:// smbspool)is used if the WS is windows or NIX configured with 
smbspool printing to a samba share.

ipp:// is used if the WS is running cupsd ie a NIX WS.


Basic printing stuff which you should know already . . .

For a Postscript printer, the user cupsd, using the normal .ppd driver, 
passes Postscript on to the remote printer, which does a raw dump to the 
printer, ie it doesn't process again.

For a non Postscript (ie. windows) printer, the user cupsd .ppd driver 
causes cupsd to pass the postscript print job through a postscript to 
windows printing converter ( automagically ) then on to the remote 
printer, again you need a raw dump to the printer, which windows does 
automatically but smbd needs to have configured.


> Can anyone point me to some documentation?


No ! Did you not try Google.


> I would like to understand the mechanism, and emulate it using simple
> scripts. (I am not interested in using it via NX, rather I want to


You need a print share on the windows workstation or a cups printer set up 
on the NIX workstation.

You need to set up a reverse tunnel from the workstation to a port on the 
NIX server. Use Openssd on a NIX WS or cygwin's Openssh on windows WS.

For a NIX workstation, you need to set up an ipp printer (typically) in 
cups on the server, pointing via the re-directed port to the workstation.

For a windows WS you need an smb printer set up in cups on the server, 
which uses smbspool to connect via the redirected port to the print share 
on the workstation after the .ppd file has kicked off PS to Windows 
conversion.


> understand it/test it by hand).
>


Good luck !!


Note, there is quite a bit more to FreeNX printing, ( the bit you are not 
interested in ), and some of the windows printing is a bit creacky.

The FreeNX authors did a sizable amount of work though overall !!! and I 
dread to think how much time they have spent . . .
 

> Thanks
> Antoine
> ________________________________________________________________
>      Were you helped on this list with your FreeNX problem?
>     Then please write up the solution in the FreeNX Wiki/FAQ:
> 
> 
http://openfacts2.berlios.de/wikien/index.php/BerliosProject: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
> ________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20090929/646ed1dc/attachment.html>


More information about the FreeNX-kNX mailing list