Pinterest Stumbleupon Whatsapp
Ads by Google

Teamviewer and LogMeIn are applications of choice for most Windows users when it comes to learning how to connect to a remote desktop. They are easy to use and don’t require any configuration. Sadly, both of them are not available on Linux. You can mess around trying to get them working in WINE but that would hardly be the ideal solution, especially when there are native tools available for remote desktop access for Ubuntu.

So let’s get started right away.

Adept Ubuntu users would already be thinking about the System > Preferences > Remote Desktop menu entry. Of course we will use that. However, it lets you configure your computer to allow/disallow remote desktop access. It doesn’t let you connect to a remote computer. Extra software is required for that, which we now look into.

Allow Remote Desktop Connections

First off, you would need to enable remote desktop on the Linux computer that you want to access via remote desktop. Doing so is easy by using the System > Preferences > Remote Desktop option. In the dialog that shows up – check “Allow other users to view your desktop”. You can also configure additional options like requiring password for remote access and notification icons. It is advisable to use a password for remote access, so that only trusted users may be able to establish a connection.

how do i connect to a remote desktop

With all that set up, its time to connect to it from another computer. Two possible scenarios arise: you can connect using another Linux machine, or you might want to connect using a Windows PC. Both require slightly different approaches. Here’s how.

Ads by Google

Connecting From Another Linux Machine

Ubuntu uses Virtual Networking Connections for remote desktop. Your best bet would be to use a VNC viewer to access the remote desktop. Use the command sudo apt-get install xvnc4viewer to install VNC viewer. Now all you have to do is to issue the vncviewer <hostname/ip> command. You will be asked for a password (if it is configured on the remote machine) and you can then view and interact with the remote desktop.

how do i connect to a remote desktop

Connect To Ubuntu From A Windows PC

If you would to connect from a Windows computer, you can use TightVNC or uVNC (There is also a seemingly portable version available that would run off your USB drive without installing, however it stores entries in the registry). Specify the IP address and the port number (default is 5900 and is not required to be mentioned explicitly), specify bandwidth that is available to you, hit Connect and you can access the desktop of the remote machine easily.

connect to ubuntu remote desktop from windows

Mac users can also use their favorite VNC client (like Chicken of the VNC) and you should be able to remotely access the desktop of the said Linux machine.

Keep in mind that none of these clients support encryption and you have only established an unencrypted connection up until now. Teamviewer and LogMeIn encrypt the the data flow between the two computer. You can use a SSH tunnel to encrypt the flow of data. Here are the steps in brief:

  • You need OpenSSH. (sudo apt-get openssh-server).
  • Create the tunnel using ssh -L 5900:localhost:5900 <ip address>, where IP address is the address of the remote computer. If you are connecting using a Windows computer, you can use PuTTY to create a tunnel.
  • Establish the connection as before however, this time you need to connect to localhost at port 5900 (or whatever port you specified in the command above). VNC client will then utilize the tunnel you just created and traffic between the two endpoints will now be encrypted.

connect to ubuntu from windows

While this a lot of work compared to the one-click solution offered by Teamviewer or LogMeIn, it is certainly more configurable and caters to a wide variety of needs. Moreover, you only need to do the configuration once and you can also establish a VNC connection with a headless server (with some more configuration though!).

If you use a simpler or still better – a one-click solution, we will be happy to know about it. Tell us about it in comments.

  1. Nogero
    December 23, 2009 at 6:50 pm

    NX, which I think is the same as freenx can't be beat for speed and all around use. It is quite easy to install. Download the client, click, click, click. Download the three packages for the server, then do:
    sudo dpkg -i nx*
    Use the wizard to connect first time, thereafter it is one easy click. I used to be a loyal tightvnc user until I discovered NX. Official site and d/l: nomachine.com
    Available for all platforms. It runs over SSH port 22. So fast you will forget you are not on the console.

  2. the_guv
    December 8, 2009 at 4:34 am
  3. the_guv
    December 8, 2009 at 4:26 am

    Varun's solution is ideal for Linux initiates, sure, but FreeNX beats it for speed ...

    https://help.ubuntu.com/community/FreeNX

    For the more adventurous, maybe the best remote access is with ...

    http://www.openvpn.net/

    ... but their docs are appalling .. so Google, say, ubuntu openvpn.

    @Mike .. I *think* the above is as close as it gets, but I dunno much on these web apps.

  4. Mike Wilson
    November 30, 2009 at 12:31 pm

    How about a solution like Logmein or Teamviewer that would allow me to connect to my work machine while at home over the internet? I used to use Hamachi and a vnc but was wondering if you knew of a single dedicated client like Logmein for Ubuntu.

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *