Network & Systems Architect

Welcome to my little blog. I am mostly techie over here, blogging about networking and system administration topics, but there will also be some Travel Reports from time to time…

How to Fast VNC alternativ to Remote Desktop to a Mac using NoMachine

March 24, 2010Christian Kildau8 Comments

I am a very happy Mac OS user with a Mac mini and a MacBook Pro coming soon, but one things I really miss about Mac OS X is the lack of a fast and standards based remote desktop solution. The VNC server built into Mac OS X isn’t really compatible with all clients, and I still haven’t figured out if it’s possible to run it with a different resolution and color depth than the real screen!!!

But, I recently re-discovered a solution I got to know in my Linux time on a desktop: NoMachine. You’ll need a server running a recent Linux distribution or OpenSolaris which will act as a kind of a proxy and the setup is a bit complex, but it does work well. I’ll show you how to do it running Ubuntu Lucid.

First go to select your architecture and download all three files: client, node and server.

Then install them in the following order, fix the missing dependecies and install a vnclient plus vncpassword:

sudo dpkg -i nxclient_3.4.0-7_x86_64.deb
sudo dpkg -i nxnode_3.4.0-11_x86_64.deb
sudo dpkg -i nxserver_3.4.0-12_x86_64.deb
sudo aptitude -f install
sudo aptitude install xvnc4viewer vnc4-common

Since it’s really advisable I hope you already have PasswordAuthentication no in your sshd_config to disable Password authentication and to only allow key-based authentication. You’ll need to tweak nxserver a bit to get it working with key-based auth. Edit /usr/NX/etc/server.cfg to…

EnablePasswordDB = "1"

…edit the following line in /usr/NX/etc/node.cfg to enable VNC…

CommandStartRFB = "/usr/bin/vncviewer -fullscreen"

…create a key for your key-based authentication and restart nxserver.

sudo /usr/NX/bin/nxserver --keygen
sudo service nxserver restart

Your new key is placed at /usr/NX/share/keys/default.id_dsa.key. Copy it the device you want to connect from using scp or similar tools. Now all you need to do is enable the users you wan’t in nxserver:

sudo /usr/NX/bin/nxserver --useradd <user>

This enables the user in NX’s database and copies the previously generated key to the user’s authorized_keys file.

Now just enable VNC on your Mac. Go to “System Preferences”, select “Sharing” and enable “Screen Sharing”:

Now you’ll need to configure your client. I’ll show you in the example of Windows 7, but NXClient is available for most almost any OS. Use something like DynDNS to remote access your Mac when behind a dynamic IP. You might also need to modify your firewall/router configuration. Please ignore my irritating cursor positioning. On the second screen you set a name for you remote desktop connection, then past your external hostname which is accessible via the Internet using TCP port 22. On the next screen you select VNC as the protocol and type in your Mac’s internal hostname or IP-Address and the password you set. Make sure you select Fullscreen, but please note that I haven’t had a chance to check if it now is possible to connect from a smaller screen to a bigger screen on your Mac. On the last screen make sure you select to open the “Advanced Configuration dialog”. In the “Advanced Configuration dialog” go to “Key” and select the key you previously copied. Save the changes, paste in your credentials at the server running NoMachine and you’re done. Login.

This article has 8 comments
  1. davidst

    awesome guide, thanks alot! good solution in that you proxy the connection over the linux machine! ill try it out on my box cheers

  2. Mark

    I’m able to connect to the Mac’s vnc server using this method, but the session immediately closes afterward. The console on the mac shows the password negotiation succeeded. Any ideas?

  3. jmituzas

    would love how to set up the connection to proxy.

    I have nx server and client on Ubuntu linux box. What configuration in nx server is needed to create the proxy connection to Mac?

    Will this also allow multiple users to connect at same time?
    The only other thing I seen that does that is Vine server.

    Wouldn’t happen to know if you can get nx web builder to install on mac?

    Would be nice to open up photoshop over a browser

  4. Burhan

    I get an error message when i connect. “Cannot set rfb password. Please Contact your system administrator”

    • Milamber

      Same problem here: “Cannot set rfb password. Please Contact your system administrator”.
      Any ideas?

  5. IBISupport

    Same problem here: “Cannot set rfb password. Please Contact your system administrator”.
    nobody has found the solution?

  6. Skater

    I came across this blog comment and thought that you would all be interested to know that NoMachine now has a native Mac server – NoMachine for Mac OS X.
    It is a fully-featured remote access solution with an array of features, still in beta but is in good condition considering..

Leave a Reply

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.