[FreeNX-kNX] how printing works

Antoine Martin antoine at nagafix.co.uk
Wed Sep 30 09:23:06 UTC 2009


ChrisB wrote:
> 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.
That's the easy part... with ssh -R
But how do you tell the client applications running on the server to
talk to this particular cups server?
In a hosted environment there may be dozens of these cups servers
running (one for each session)
That's the bit I am missing...

>> 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.
> 
If I only deal with the somewhat easier case of nix workstations with
cupsd running on the client, why can't I just get the server to point
the apps to talk directly to that remote cups server? (via ssh -R or
plain tcp if on a secure LAN)
And if so... how?
(same question as above really)

>> 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 . . .
[snip]
> 
>> Can anyone point me to some documentation?
> 
> 
> No ! Did you not try Google.
Yes.
I never bother dozens of people on mailing lists without spending a fair
amount of time doing my homework.
Thanks for your very detailed response though!

>> 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.
Check.

> 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.
Check. (or plink on windows)

> 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.
I would like to avoid this part (as mentioned above).
If not, can this be done easily/reliably from a script? (and without
generating a whole new cupsd.conf if possible)

> 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.
Sigh.

>> 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 for the hint... I think I'll try to keep it simple for now!

Antoine
>  
> 
>> 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
>> ________________________________________________________________
> 
> 
> ------------------------------------------------------------------------
> 
> ________________________________________________________________
>      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
> ________________________________________________________________




More information about the FreeNX-kNX mailing list