[FreeNX-kNX] Printing from NX server session through client-side printers

hermeticus hermes.tresmegistos at gmx.de
Fri Sep 12 11:39:31 UTC 2008



vsp_123 wrote:
> 
> Hi,
> 
> I brought this issue earlier in this list,
> http://mail.kde.org/pipermail/freenx-knx/2008-July/007152.html 
>  Did not get any useful response. Does anyone use client-side  
> printing through FreeNX?
> 
> Thanks,
> Prakash
> 

Hi Prakash,

yes, i use client side printing (cifs over nx ssh tunnel) since two days.
Here's my little story:

My Setup:
   Server: freenx server 0.7.2 + nx 3.2.0 (both from centos 5.2 rpms), 
   Client: WinXP Sp2 with nomachine clients
   Session: a rootless started simple python app, which acts as a
application startup bar.

I had to:

- get the confusion out of my head after searching the list and reading all
the nxredir or patched samba stuff ;)

- compile nxredir and nxsmb from source (because they were missing in the
centos rpms)

- set ENABLE_SAMBA_PRELOAD=1 in setup node.conf

- modify /usr/bin/nxnode (on my server the printer name was somehow not
set):
I added a "printer=$share" in "cmd_node_addprinter".

- copy a ppd file by hand into the driver cache
(/home/<user>/.nx/config/ppd/)
(I'm not sure how this "download PPD from cups" thing should work. Maybe
only for linux clients?)
After doing this, the printer was added to the userspace cups.
But as you mentioned earlier in a post, the export of CUPS_SERVER isn't
working all the time (well actually never for me).
I overcome this by looking for the userspace socket:
   "CUPS_SERVER=$(grep Listen .nx/C-proxy.sme.com-10*/cups/cupsd.conf | sed
's/Listen //')"
and exporting this myself in the python app launcher for all started
applications.
So after this my apps found the right cups instance, but were not able to
print.
I was always getting "nxsmb backend has failed". Struggled with that a while
and found out that there were authentication problems inside the tunnel.
Authentication logging on the windows box was telling me, that it was
getting wrong credentials. 
Then i played a little around with cups inside the tunnel and narrowed the
problem down to the special backend uri "nxsmb:". 
This wrapper script calls the "normal" smb backend with preloaded libnxredir
(to use the tunneled CIFS port) and mangles the DEVICE_URI from
"nxsmb://127.0.0.1:<tunnel-highport>/cifs/printername" to
"nxsmb://127.0.0.1:445/printername". Now here comes the problem: The smb
backend (at least on my system) was behaving strange with that URI. It was
expecting "smb://....".

- add another URI mangle to nxsmb:
DEVICE_URI=$(echo $DEVICE_URI | sed "s|nxsmb:|smb:|")

After adding these second mangle line printing was working (well, except for
firefox, but that's another story).

Hope that will be of help and that i'm not violating mailing list etiquette
to badly (i'm a complete mailing list newbie).

Johannes P.
-- 
View this message in context: http://www.nabble.com/Printing-from-NX-server-session-through-client-side-printers-tp19209214p19454101.html
Sent from the freenx-knx mailing list archive at Nabble.com.




More information about the FreeNX-kNX mailing list