[FreeNX-kNX] [ANNOUNCE] "ssh -NX" now almost possible ...

Fabian Franz FabianFranz at gmx.de
Thu Sep 16 17:10:38 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

a slashdot reader said it at some point in one FreeNX announcement:

"I think NX should work like ssh -X, just ssh -NX."

Well, its not ssh -NX, but a modified nxtunnel-0.1 in beta stage, but it 
works.

nxtunnel fabian at remote bash

open a nxagent window and a normal bash, like if I used just ssh -X ...

But if I now start a X-Application its automatically run through a rootless 
NX-Agent:

xterm &

Be warned: Rootless mode is still experimental ...

If you _close_ one window with the close button, it'll close the whole 
NX-Agent.

If you just do: Exit in that xterm it works though ...

If anyone knows, how to fix that: Please do!

But I can also run all applications in a new virtual desktop:

nxtunnel fabian at remote -r bash

I can then start xeyes, kmail and for example a window manager and use all my 
applications with _almost_ the best speed.

_Almost_ because it somehow says that it uses best image compression, but is 
using not; you can benefit from all other speed enhancements though.

We'll still have to investigate that.

And if I just want to start a quick KDE session at the remote end I do:

nxtunnel fabian at remote -r startkde

For this to work you'll additionally need the "netpipes" package or at least 
the binaries faucet and hose.

You can get it from a debian mirror:

http://ftp.debian.org/debian/pool/main/n/netpipes/netpipes_4.2.orig.tar.gz

http://packages.debian.org/testing/net/netpipes

Technically this works by using a "fakedisplay" and running NX over the ssh -X 
tunnel.

That means you can profitate from the NX compression everywhere, where you are 
able to also use ssh -X !

For a short explanation: 

ssh awaits the magic cookie and checks it against its own fake cookie, if it 
matches, it is replaced by the real cookie. Afterwards the channel is set 
into normal mode.

This means you can use the ssh -X channel for everything you want, by just 
sending the correct magic cookie as the first action.

To get the magic cookie, we created the following nice shell-bit:

printf "l\0\v\0\0\0\022\0\020\0\0\0MIT-MAGIC-COOKIE-1\0\10$(xauth list :
${DISPLAY#*:} | sed 's/\([ ]*[^ ]*\)\{2\} *//; s/\([0-9a-f]\{2\}\)/\\x\1/g')" 
| hexdump -C

You can get the nxtunnel-0.1 beta script from:

http://debian.tu-bs.de/knoppix/nx/experimental/nxtunnel-0.1

I think Neal will make the script even more secure and reliable, as its 
originally his code and I just added the missing bits.

I'll also take a short break for 1 or 2 days of NX development.

cu

Fabian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBSckSI0lSH7CXz7MRAhjXAJ9YosOVNS0PUSw42JZXk4WPqdw3mACdFtbn
LYEp533Mra3aLtMwTNyvUtY=
=IiCB
-----END PGP SIGNATURE-----




More information about the FreeNX-kNX mailing list