Archive

Posts Tagged ‘nx’

/usr/NX/bin/nxserver –keygen … Please, I want the last two hours of my life back!

October 27, 2011 3 comments

As good as Nomachine’s NX is … the documentation is seriously confusing  and all over the place with some documents more complete than others.

I tried to check out their new 4.x preview just yet (oh, and no, it’s definitely not ready for production), and as I always do, generate my own keys to go with it. But after the usual /usr/NX/bin/nxserver –keygen, a restart failed with

NX> 500 ERROR: Cannot start service: nxserver
NX> 500 Authentication as user nx using the NX SSH key-pair failed.
NX> 500 This may be due to the configuration of your SSH server. Please
NX> 500 ensure that the location and file name of the SSH authorized
NX> 500 keys is the same in both the SSHD and NX server configuration
NX> 500 files and that the nx user is listed among the accepted users
NX> 500 in the SSHD configuration file.
NX> 999 Bye.

Got seriously frustrated, because all seemed well according to documentation. Well, it seems like there is one important step missing – renaming or copying

/usr/NX/share/keys/default.id_dsa.key

to

/usr/NX/share/keys/server.id_dsa.key

If you don’t do that, nxserver will happily continue to use its prior key (which makes sense I guess, you aren’t going into production with new keys the second you generate them) while the nx user will already have the new keys in place.

So basically the procedure is:

# /etc/init.d/nxserver stop
# /usr/NX/bin/nxserver --keygen
# chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2
# chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2
# chown nx:root /usr/NX/home/nx/.ssh/default.id_dsa.pub
# chmod 0644 /usr/NX/home/nx/.ssh/default.id_dsa.pub 
# cp /usr/NX/share/keys/default.id_dsa.key /usr/NX/share/keys/server.id_dsa.key
# /etc/init.d/nxserver start

Of course, your client(s) will also need to import the new server key.

Advertisements
Categories: rants, unix Tags: ,

NoMachine NX, Ubuntu and the XSession

October 27, 2011 1 comment

If you get the dreaded

'Cannot run /etc/X11/xdm/Xsession ...'

when requesting a new session on an Ubuntu server, this – at least for me – fixed it:

sudo mkdir /etc/X11/xdm && sudo ln -s /etc/X11/Xsession /etc/X11/xdm/Xsession
Categories: ubuntu, unix Tags: , ,

Installing NoMachine NX on ArchLinux

March 1, 2011 5 comments

Pain in the butt… if you don’t know you need to specify redhat as system. From then on it’s smooth sailing. Download from nomachine.com and then:

# switch to root
cd /usr
tar xfvz <nxnode-whatever is current version now>
tar xfvz <nxclient-whatever is current version now>
tar xfvz <nxserver-whatever is current version now>
ln -s /etc/rc.d /etc/init.d
/usr/NX/scripts/setup/nxnode –install redhat
/usr/NX/scripts/setup/nxserver –install redhat
rm /etc/init.d

That’s pretty much it. You might want to create your own keys instead of the default NoMachine keys by doing /usr/NX/scripts/setup/nxserver --keygen, but it’s not required.

(Yes, I know – there is FreeNX in the Arch repositories. It works… kind of. Resuming a session from Windows to Linux and vice versa might work, but usually does not. Hence for personal use I prefer the original NoMachine distribution – the two connection limit is usually more than enough. PS: Did I say I love NX? It’s an awesome product in so many ways.)

Categories: archlinux, linux, rants Tags: ,
%d bloggers like this: