Geek Gal: Setting up NX Terminal Server on Ubuntu

French German Italian Spanish

WARNING RARE TECHNICAL POSTING – please feel free to glaze over if the following means nothing to you (please try not to dribble uncontrollably though, I hate that). For those that do have the need or desire to do computer technical duties then you might find this useful (or not, as the case may be) as a remote desktop or terminal server/ thin client solution.

Background:
My partner is in Australia for several months and so has to use a dial-up Internet connection with capped bandwidth usage (Advance Australia unfair?). I have setup a remote desktop to allow her to connect to and use, thus confining the greater bandwidth usage to our unlimited broadband connection in Blightey so she gets a speedier desktop experience via dialup whilst only consuming the small bandwidth needed to receive the remote desktop itself. The solution I’ve chose is NX server which is a way of transmitting a compressed X desktop via an encrypted SSH connection thus ensuring security. It’s best thought of as almost like citrix for linux. This is a true linux terminal server solution that will allow multiple accounts and users to be logged in at the same time whether on dial-up or broadband. I intend to employ a similar thin client setup for a local community group enabling the running of a fast modern desktop on ancient donated computers.

Here’s the heads up on the setup:

PIII 866 computer with 384Mb ram (one of the pile of donated computers I have around)
Ubuntu 6.10

NX free edition for linux

The setup routine (in order)went like this
Install Ubuntu Linux on the PIII
Undertake any upgrades or extra software installs
setup account(s)
Install Free NX in this order:

Client, node and then server from here (Ubuntu .deb)

(Non Ubuntu RPM and tar options here )

Install ssh:

Gnome terminalOpen Terminal:

sudo apt-get install ssh

(Optional bits in italics)On some machines or networks, port 22 may be blocked or not allowed. For example, some providers block port 22. To make the SSH server listen on port 877, you can do the following

Edit the file /etc/ssh/sshd_config

sudo gedit /etc/ssh/sshd_config

Find

Port 22

and change it to

Port 877

You then need to restart SSHD:

Gnome terminalagain in terminal:

sudo /etc/init.d/ssh restart

(Optional bits ONLY if you had to change the default SSH port)

Edit the file /etc/nxserver/node.conf

sudo gedit /etc/nxserver/node.conf

Find

# The port number where local ’sshd’ is listening.

#SSHD_PORT=22

and change it to

# The port number where local ’sshd’ is listening.

SSHD_PORT=877

(end of optional bit)

Install no-ip dynamic dns service on the server (if like me you are not guaranteed a permanent static IP address)
Go to the website, signup and choose a host identity

Gnome terminalOpen up your terminal and run “sudo apt-get install no-ip”.
Then run “sudo no-ip -C”
Select your appropriate login information and chosen host

Port forward port 22 (or 877 if you’ve optionally configured for that port) to the server station via your firewall. Mine is done via my broadband router.

Issue connection details to the person desiring remote access
Available clients (windows, OS X, and linux) are here

Problems:
Unlike my previous experience with FreeNX installed via apt, I only had one initial support issue once setup and that was that the remote connection was only getting a black screen so I added the /usr/bin/gnome-settings-daemon via the Ubuntu system-prefs-sessions to the server start-up which seemed to clear the problem.

There, icky technical stuff over and done with….bleeeaaahhh! (chocolate, I need chocolate, give it to me).

What did I tell you about the dribbling?


add to del.icio.us :: Add to Blinkslist :: add to furl :: Digg it :: add to ma.gnolia :: Stumble It! :: add to simpy :: seed the vine :: :: :: TailRank

Advertisements

19 Comments Add yours

  1. james says:

    Wow.. that’s a comprehensive approach!

    I tend to have a remote desktop connection to my mac at home using VNC, ssh and PuTTY’s handy tunnelling abilities, mainly since it’s a piece of cake to set up.

    I guess it’s a bit more bandwidth-hungry since it’s a full screen representation (although I’ve toyed with getting a 640×480 version for my ipaq!), but seems to work OK (with the added benefit of the main session being available for the family)…

    james

  2. emalyse says:

    Well it’s for a specific solution as it allows multiple account connections at the same time to a single computer each getting their own desktop ala terminal server or citrix and gives pretty good results to dialup users as well as not saturating bandwidth.You can also use it to compress existing vnc or rdp connections if you use an NX server as a kind of tunelling gateway. Try doing remote desktop support work whilst using Skype and VNC…s-l-o-o-o-ow. There’s no right or wrong anyway- it’s what works for you and your users.

  3. Stuart says:

    so I added the /usr/bin/gnome-settings-daemon via the Ubuntu system-prefs-sessions to the server start-up which seemed to clear the problem

    Hi, I’m getting the black screen too. Could you explain in more detail how you did this so I can try it?

    Thanks.

  4. emalyse says:

    Hi Stuart
    I’ve made a quick step by step pdf that you can download from here:
    http://www.divshare.com/download/269101-589

    See if that works for you
    Kind Regards
    Em

  5. Mike says:

    I still get the blank even after the instructions in the pdf file. Is there anything else missing?

    Thanks,
    Mike.

  6. emalyse says:

    Are you using Ubuntu 6.10?(just in case you’re pushing it with the bleeding edge versions after that).I would try the NX session manager on the server to see if your previous attempted session is still hanging there. If so terminate it, restart the server and try to connect again.

  7. Mike says:

    Yes I’m using 6.10 and the session manager does not show any opened sessions. I realize it takes a long time for the session to appear, but I still get the following gnome error.

    “There was an error starting the GNOME Settings Daemon.
    Some things, such as themes, sounds, or background settings may not work correctly.
    The last error message was:
    Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

    GNOME will still try to restart the Settings Daemon next time you log in.”

  8. emalyse says:

    Sounds odd. I’ve installed this on setup on around six machines now and not really had any problems save for the black screen problem on one client. The remote screen doesn’t take too long to appear even over dialup. There has been a reported bug in the Gnome settings Daemon talked about here: https://launchpad.net/ubuntu/+source/control-center/+bug/61381

    Lots of possible causes, I’m afraid.

  9. Tim Archer says:

    I did a small writeup on securing SSH through obscurity (changing the port) at http://timarcher.com/?q=node/46

    It may help you as you may want to also disable the root login if you havent done so already.

  10. emalyse says:

    Hi Tim
    Thanks for that though I’m writing specifically about Ubuntu which you can’t login as root user (by default) though in order to disable root user login entirely it would just be:
    sudo passwd -l root

  11. lewis says:

    I setup ubuntu abs TS using NX server( software) and ssh. I only have a possibility to just 2 users……what’s that all about? does anyone knows how to help me out with this

  12. emalyse says:

    Hello lewis, Are you using NX server or FreeNX?

  13. mike says:

    I’ve had this working on ubuntu using the freenx and the nx machines free download and found the nx machines version so much easier to install and packed with a few more features.

    I want to run Non-linear video editing and 3D apps remotely accross a 10/100mbs networl and just don’t see the performance in NX machines s/w to do this – I thinks its going to need at least 30fps.

    Has anyone managed to get smooth video playback on a remote session?

  14. emalyse says:

    Hello Mike- High speed video work CAD and animation has not traditionally been best suited to thin client computing. To my knowledge only commercial Citrix solutions and the new Thin/Fat hybrid solutions have managed to combine local processing needs and remote desktops efficiently.The proposed net2display standard is seen as one way of bringing full motion video to thin clients. It’s still a bit sledgehammer to crack a nut at the moment.

  15. John says:

    Session issues as described may be due to a Trouble Report open here:

    http://www.nomachine.com/tr/view.php?id=TR01E01609

    We have good success with many CAD applications but as emalyse pointed out, those type of applications tend not to be optimized for terminal services solutions. These are especially vulnerable over a 10/100MB link obviously. We are seeing much better success with customers with true Gigabit networks in place.

    For other issues, please don’t forget to search the knowledgebase here:

    http://www.nomachine.com/support.php

    NX relies only on the SSH port that the admin designates to listen for connections. You will need to change that port in /usr/NX/etc/server.cfg for NX to pick that up. Key to look for is #SSHDPort = “22”. You will need to change and uncomment that as the default is port 22.

    /John

  16. akhtar says:

    From where I can download FreeNX, I downloaded from http://www.nomachin.com but its not free allows 2 users to connect.

    Thanks

  17. emalyse says:

    Hello Akhtar- have you checked nxserver config /etc/nxserver/node.conf
    To see what this is set at: see here:
    http://ubuntuforums.org/showthread.php?page=2&t=184374

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s