How to install NX Free Edition on Ubuntu 12.04 Precise Pangolin
Screenshot of NX client connection to Ubuntu 12.04 with NX Free |
While this may be a viable option for others, VNC has a few drawbacks that sent me looking for something a little more suited for my situation. Namely, I needed a speedy connection, and security.
One problem with VNC is that it's a non-encrypted and therefore non-secure protocol. The workaround for this is to configure the server to tunnel VNC client connections through SSH sessions. Unfortunately, doing this requires extra configuration on both the server and the client.
Another problem with VNC (at least one that I've experienced) is the laggy connections, which can make the user experience less than optimal. So in my search for a better alternative, I found "NX Free Edition" by www.nomachine.com.
NX Free Server delivers the X Window session to clients via the encrypted SSH (Secure Shell) protocol, and it does it much faster and snappier than my experience with VNC. The only drawback of NX Free Edition is the license, as it is proprietary..
Although "NX Free" edition is said to be "free forever". Looking at the license file in the .deb package, it appears there are a number of GPL-covered items there, and then some items with the proprietary license. Checkout the license for NX Free for yourself here.
On the subject of NX servers, there is a FreeNX server PPA for Ubuntu 12.04(and other LTS versions), it's named ppa:freenx-team . Unfortunately, at the time of this writing, the packages from the ppa:freenx-team didn't seem to work properly for me. There was some error message concerning the esound dependency package not being available for install.
So, instead of FreeNX, we'll install NX Free Edition with the provided .deb installers instead. I used the 64-bit versions in my tests. Apparently, the big difference between 'FreeNX' and 'NX Free Edition' is that FreeNX is wholly FOSS and has no connection limits whereas the NX Free Edition is only partially FOSS and is limited to 2 client connections (according to the license page at the link above).
Before installing the NX Free Edition pacakages from: www.nomachine.com, first install the openssh-server package from the Ubuntu repositories.
sudo apt-get install openssh-server
After the pre-requisite has been installed, download and install the 3 NX Free Edition components from the "NX Free Edition for Linux" section at www.nomachine.com ( packages are installed in this order: client / node / server). Example:
sudo dpkg -i nxclient_3.5.0-7_amd64.deb
sudo dpkg -i nxnode_3.5.0-7_amd64.deb
sudo dpkg -i nxserver_3.5.0-9_amd64.deb
As for the connection to the NX Free Edition server, simply download the client from www.nomachine.com that works with your platform. There are versions for all 3 of the Major operating systems available.
As of this writing, the regular Ubuntu session provided by NX Free server doesn't quite work as expected . Not to worry, the 'ubuntu-2d' session does work well. I'm working on getting the appropriate server-side configuration for this so the setting won't be required at the client, but in the mean time, the workaround is to configure the NX Free client Session setting as follows:
Application > "Run the following command": gnome-session --session=ubuntu-2d
Options > Enable 'New virtual desktop'
That's it. NX Free Edition works great and it's one solution to the problem of needing more security and speed over the default VNC client in Ubuntu GNU/Linux. Here's a screenshot of the client connection.
Feel free to leave your comments below. If you are using Ubuntu 11.10 and are having problems with Unity at the client, see this link for the workaround. For more information concerning FreeNX on Ubuntu, see this link.
Looking for the FreeNX Server installation instructions? See my post "How to install FreeNX on Ubuntu 12.04 Precise Pangolin" instead. Cheers!
Shannon VanWagner
04-25-2012
Hi Shannon,
ReplyDeletecritically the title is wrong - you describe the installation of nxserver (limited to 4 connections) and not the installation of FreeNX which does not imply this restriction...
Regards,
J
Thank you for this early report, I will try soon.
ReplyDelete@J - Thanks for pointing that out, I really appreciate it. I've since updated the posting with the correct title and language. Cheers!
ReplyDeleteHi I thought there were problems (acknowledged by nomachine) running NX Free on Gnome 3/Unity desktops.
ReplyDeleteDid you actually install and test those versions of NX Free on Ubuntu 12.04 ?
@Anonymous - Thanks for pointing that out. I've since added the specific client configurations to make the client work well with the Ubuntu 2d session.
ReplyDeleteInteresting... and likely timely since I'm about to switch from VNC tunneling to NX with 12.04 (both ends) and came across your post in the process. (Memo to self - even when you find the info you need it is worth a read of the comments too!).
DeleteAm I right in thinking this would require the server session to be switched out of Unity3 to unity-2d? I guess that is simply going to be a common requirement of any remote interface for the time being, but you would think it not beyond the wit of Linux man to make that something which is "turned off" during remote access?
@Mainframeguy - The sessions for the NX Free clients are independent of the settings for the logged in user. So you can login using the ubuntu-2d session, even though the console user may be logged in with the regular Ubuntu session. Also, the available sessions are in:
Delete$ ls /usr/share/gnome-session/sessions/
gnome.session ubuntu-2d.session ubuntu.session
And you can add the gnome-classic session (ver 3) to the directory above with:
sudo apt-get install gnome-session-fallback
Shannon - I followed your instructions above (and, BTW, thanks for your efforts) but only partial success. The server and client machines are both Ubuntu 12.04 running unity. When I connect I can see the server desktop but no Unity launcher icons and no Gnome menus either. I'm sure I'm overlooking the obvious here but what am I doing wrong?
ReplyDelete@Don Karon. For a proof test, I setup Ubuntu 12.04 64-bit in virtualbox-ose. I then installed openssh-server, the NX Free client/node/server (64-bit deb packages), applied the Ubuntu updates on the machine, and rebooted it. For the client connection, I booted to the Ubuntu 12.04 32-bit LiveCD from a test virtualbox-ose machine. I then installed the NX Free client (32 bit deb pkg), applied the ubuntu-2d settings shown in the screen capture above and connected to the the other virtualbox-ose machine on the first attempt. Are you using Ubuntu 12.04 for both the server and client? Also, can you ssh to the server? Are your client settings the same as the screenshot I've added?
ReplyDeleteBoth machines are 12.04 64 bit, installed from the command line after download from the NX web-site.
ReplyDeleteI will try NX-ing in to the host after logging in as a 2d Ubuntu session on the client machine.
What I saw on the host machine was a second instance of the Unity tool bar on the left side but this wasn't visible on the client machine.
@Don Karon, something I noticed is the resolution can get squirrely on the client. From inside the NX Free client session, are you able to right-click the desktop and select "Change Desktop Background", then click "All Settings">"Displays", then change the resolution to something that matches your session (e.g., 1024x768)?
ReplyDeleteShannon -
ReplyDeleteI don't know what changed but now it works. The host machine Unity toolbar now displays on the client, is in 2d while the client toolbar right next to it is in the normal (3d) display. Beats me why it's working but happy to solve this.
I tried your suggestion about looking at the desktop resolution via System Settings > Displays in the host machine. It shows an appropriate resolution for the client machine and even labels it "Laptop". I tried to set 1920 x 1080 on the drop-down list, which is well beyond what this laptop client can show. It caused no apparent change in the display on the client.
Shannon- Thanks a bunch!
ReplyDeleteThis is much better than opening a session over ssh X and much better than VNC. I tried to use the FreeNX server but I never got it to work. For some reason I wasn't able to authenticate. But the NX Free Server did the trick. I'm still messing around with display settings but that is second order for me right now.
Cheers!
Thanks a lot. This works very well.
ReplyDeleteI have a setup where at work I use my ubuntu desktop and I connect to work from home through a session using NXClient. Now I want to have the same session at work and at home. Its only possible if I use the same session at my work by connecting using the NXclient on my local desktop. Can I do without the session when I am right sitting in front of my desktop ?
Thanks very much for the help.
hello, how can I remotely configure this ?
ReplyDeletewhat can I vi to enable this remotely on a machine?
Application > "Run the following command": gnome-session --session=ubuntu-2d
Options > Enable 'New virtual desktop'
I was having this problem of connecting to my home laptop remotely for ever. Although it seemed to work locally at home, I could not do it remotely, through my Cable modem connection. This is fixing my problem. For now, because I understand that Ubuntu 12.10 will actually remove the 2d desktop option. Hopefully, I will be able to find another fix like this one then. Thanks for the trick. Very useful.
ReplyDeleteHi not sure if it matters but the filenames have slightly different numbers now. nxnode is 0-9 and nxserver is 0-11
ReplyDeleteGreat tutorial, thanks for the info. =)
ReplyDeleteThanks for the ubuntu 12.04 fix. I was looking for just this fix :)
ReplyDeleteI am trying this from;
ReplyDeleteServer installed on Lubuntu 12.10.
Client: windows 7.
Instead of "gnome-session --session=ubuntu-2d", I used;
"lxsession --session=lubuntu-2d"
I followed the rest of the directions, but when I try to log in from the Windows 7 client, I just get a black screen.
Anyone else have the same issue?
Thanks in advance.
I am getting the same problem.
ReplyDeleteServer on ubuntu 12.04
Client: windows 7
Using "gnome-session --session=ubuntu-2d"
With Ubuntu 12.10 I am getting the connection but I get a pop up little screen with a button. Nothing else. I click the button and I get a blank screen
ReplyDeleteHi
ReplyDeleteI have followed the instructions on Ubuntu 12.04 LTS server without desktop interface. I am working remotely through ssh - putty. I installed unity and after that I tried to install NX Free edition, but when tried to connect I received following report:
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.
In server.cfg I set to 0 parameters about authenticating and passwords to be used from nx database. What is wrong? How should I repair my installation?
BR,
Ognyan
@Ognyan Nikolov,
ReplyDeleteYour problem most likely has to do with SSH keys. By default, SSH daemon looks for "authorized_keys" file, while NXFree creates and looks for "authorized_keys2". So make sure you use one or the other in both the SSH daemon and in the server.cfg file as well.
If you are using the default key from both the server and the client, it should work just fine (make sure you merge this 2 files if you have keys in both!)
Also make sure your SSH daemon config allows both RSA keys authentication and password authentication as well.
Please note that you need to have the correct permissions over the authorized_keys files (file mode 400, and proper ownership according to user).
Then run:
/usr/NX/bin/nxserver --status
NX> 900 Connecting to server ...
NX> 110 NX Server is running.
NX> 999 Bye.
Can someone please confirm the number of concurrent connects NXFree provides?
ReplyDelete