[FreeNX-kNX] Printing to Windows client from FreeNX server session
Prakash Velayutham
prakash.velayutham at cchmc.org
Sat Nov 10 01:42:03 UTC 2007
Fabian,
On Nov 9, 2007, at 5:16 PM, Fabian Franz wrote:
>> Hello,
>>
>> More info on this issue. This is what I get when I try a smbclient in
>> the FreeNX server.
>>
>> Receiving SMB: Server stopped responding
>> session request to 127.0.0.1 failed (Call returned zero bytes (EOF))
>> Receiving SMB: Server stopped responding
>> session request to 127 failed (Call returned zero bytes (EOF))
>> Receiving SMB: Server stopped responding
>> session request to *SMBSERVER failed (Call returned zero bytes (EOF))
>
> This is what happens exactly when a SMB request (smbclient) is made
> to a CIFS resource. (port 445 on Windows)
>
When I select "File and Print sharing" on my NXClient in Windows,
which ports get forwarded (tunneled??) to the server-side?
According to http://www.blisstonia.com/eolson/notes/smboverssh.php, if
a client has sharing enabled locally, a remote forwarding of this port
cannot work. Could this be the issue I am facing? Sorry for being
ignorant here.
> Samba distinguishes internally between SMB and CIFS via a hardcoded
> port==445.
>
> I had started negotiations with Samba, but forgot about the issue
> again - oops.
Sorry, I do not understand this.
> You can set SAMBA_MOUNT_SHARE_PROTOCOL=smbfs and open up the 139
> port on Windows XP (SP2 or later). (0.7.1)
To reinforce, if I perform smbclient -L WindowsSystem -Uusername from
a Linux system, I am able to list all the shared on the windows
system. But with the tunneled port, I am not able to do smbclient -L
127.0.0.1 -p <tunneled port> -Uusername.
> Then it should work again.
>
> For all other cases (CIFS) we have two possibilites:
>
> - Fork off samba or use the smbprint from NoMachine.com, which can
> be given a cifs or smb parameter.
>
> - Use my old work to have a userspace port redirection from 445 to
> whatever port we use in that session for samba, which should
> hopefully work.
>
> In the long term I would prefer a change in smbprint of course, but
> for the short term version the hack could be working.
>
> It would go like that:
>
> - Compile and copy the library from http://svn.berlios.de/svnroot/repos/freenx/nx-utils/nxredir/
> to e.g. /usr/NX/lib/libnxredir.so.0
>
> - Configure exporting of NXSESSIONID
>
> - Create /usr/lib/cups/backend/nxsmb as follows:
>
> #!/bin/sh
>
> NXSAMBA_PORT=$(cat "$HOME/.nx/C-$NXSESSIONID/scripts/mport")
> export NXSAMBA_PORT
>
> DEVICE_URI=$(echo "$DEVICE_URI" | sed "s/:$NXSAMBA_PORT/:445/")
> export DEVICE_URI
>
> LD_PRELOAD="/usr/NX/lib/libnxredir.so.0 $LD_PRELOAD"
> export LD_PRELOAD
>
> # invoke the program with the args given
> exec /usr/lib/cups/backend/smb "$@"
>
> - Make it executable:
>
> $ chmod a+x /usr/lib/cups/backend/nxsmb
>
> - Change nxnode to add printers with backend nxsmb instead of smb
>
> Then samba _should_ use CIFS. You can of course also play around
> yourself via using the above commands with the redir command.
>
> This way evcn smb:// should work in konqueror (started after the
> library was preloaded) and besides it being a hack I wonder why I
> haven't yet added it as an optional service directly.
>
I am sorry that I am not an expert at these right now. Would it be
possible for you to give me a list of pointers (both Windows client
settings and FreeNX server settings) so I can check my steps against
that? Please let me know if you want to know my setup here.
> cu
>
> Fabian
Thanks a lot,
Prakash
More information about the FreeNX-kNX
mailing list