Lgo.png

 Going Linux

   for computer users who just want to use Linux to get things done


Connecting to and controlling a Remote computer's desktop

Updated: 12-Nov-2016

In episode 114, Tom and Larry discussed how to setup Vinagre/VNC Remote Desktop on Ubuntu. Although VNC is still available, the technology has progressed since 2010, and our recommendations have changed as a result. Now we recommend X2Go, which is more secure and more flexible.

Installing X2Go

The X2Go Server gets installed on the computer you want to gain access TO. This is the REMOTE computer. The X2Go Client gets installed on the computer you want to access the remote computer FROM. This is the LOCAL computer. For information general about installing software applications on Linux, see our article, Installing Linux Applications.

Installing the X2Go Server

Installing the X2Go Server application on the remote computer is particularly easy on Ubuntu MATE, so we will describe that method here. If you use a different version of Linux, look for it in your "Software Center" or "Software Manager." More options can be found at the X2Go Wiki.

  1. Open the Software Boutique (System > Administration > Software Boutique)
  2. Use the search feature and search for "Remote" or "X2Go."
  3. Scroll down until you see X2Go Server.
  4. Click "Install."
  5. When the installation is complete, click the "Launch" button to start the server.
Install X2Go Server

Installing the X2Go Client

Installing the X2Go Client application on the local computer is even easier. These instructions are for Ubuntu MATE. If you use a different version of Linux, look for it in your "Software Center" or "Software Manager."

  1. Open the Software Boutique (System > Administration > Software Boutique)
  2. Use the search feature and search for "Remote" or "X2Go."
  3. Scroll down until you see X2Go Client.
  4. Click "Install."
  5. When the installation is complete, click the "Launch" button or select it from the menus at Applications > Internet > X2Go Client.
Setting up the X2Go Client

Once the X2Go Client is installed on your remote computer and the X2Go client is installed on your local computer, you will need to setup a session before making the connection. Before you configure the X2Go Client, you will need the IP address for the remote computer. The easiest way to do this is to click the network connection icon in the panel, and select "Connection Information" from the mentu. The connection

Getting the IP address

  1. After launching X2Go Client, you setup a new session from the menus. Session > New session then complete the connection information.
    Session setup window

  2. Give the session a name. I have chosen "dm4" because that is the name of the computer I'm connecting to.
  3. Change the icon for the session if you wish by selecting an image from your hard drive.
  4. Enter the Server information starting with the IP address for the remote computer that you found earlier.
  5. Enter the username you normally use to log-in to the remote computer.
  6. The remainder of the default server settings should be fine for most users.
  7. Under "Session Type" you want to select "Connect to local desktop" if you want to control the running desktop on the REMOTE computer. (This is controlling the local desktop session that is running ON THE REMOTE COMPUTER.) Other choices for this value will open a NEW desktop session on the remote computer.
  8. Click "OK" to save the session settings.
Controlling a remote computer using X2Go

Now you are ready to connect to the remote computer with X2Go. Of course, the remote computer will need to be running first. X2Go does not have access to your computer's power button!

X2Go Sessions

  1. Click the session you wish to launch on the right side of the main window and enter the username and password for the REMOTE computer, and click "OK".
  2. The first time you launch a session, you will be prompted to trust the security certificate. You will need to accept this only once.
  3. Every time you start an X2Go session, you will be asked whether or not you want to control the remote desktop. If so, select "Full access." Otherwise select "View only."
  4. The remote computer's active desktop will open in a new window. You can change the size of the window just like any normal window, and you can now control the other computer from within this window.
  5. To close the session without shutting down the remote computer, simply close the window.

Bypass a router

So far we have assumed that both the remote and the local computer are on the same home network. If they are on different networks (there is a router between the remote computer and the local computer) you can use port forwarding on the router to get the connection to work. Port forwarding allows you to connect to the IP address of the router (provided by the ISP) and have that connection passed through the router, to the IP address of the computer on the local network. For X2Go, the port you want to forward is 22, the SSH port. How you do that will vary from router to router. These two screen shots from two different routers may give you an idea of how you setup port forwarding on your router. Please note that using Remote Desktop across the Internet is EXTREMELY insecure. With many remote control applications, your password us completely unencrypted, so your transmission could easily be intercepted, and the remote computer could easily attacked and taken over! You definitely want to ensure that the software you are using encrypts the session, if you want to do this routinely.

Port forwarding a Belkin router

Port forwarding a Linksys router

Site Created with theMaker for Linux

Theme music for the Going Linux podcast is generously provided by Mark Blasco. https://www.podcastthemes.com
Creative Commons License Going Linux Podcast by Larry Bushey is licensed under a Creative Commons Attribution 4.0 International License.