Installing and Configuring X2Go Server and Client on Debian 8

Much of the power behind Linux comes from the command line and the ability for a system to be managed easily remotely. However, for most users from the Windows world or novice Linux administrators, there may be a preference to have access to the graphical user interface for remote management functionality.

Other users may simply have a desktop at home that may need to have graphical applications managed remotely as well. Which ever situation may be the case, there are some inherent security risks such as the remote traffic not being encrypted thus allowing malicious users to sniff the remote desktop session.

Install X2Go Server and Client in Linux

Install X2Go Server and Client in Debian

To solve this common issue with remote desktop systems, X2Go tunnels the remote desktop session through secure shell (SSH). While only one of many of the benefits of X2Go, it is a very important one!

Features of X2Go

  1. Graphical remote desktop control.
  2. Tunneled through SSH.
  3. Sound support.
  4. File and printer sharing from client to server.
  5. Ability to access a single application rather than a whole desktop session.

Environment Setup

  1. This guide assumes a working Debian 8 (Jessie) setup with LXDE (other desktop environments are support however; please see this link).
  2. Another Linux client to install the X2Go client software (This guide uses Linux Mint 17.1 with the Cinnamon desktop environment).
  3. Working network connection with openssh-server already installed and working.
  4. Root access

Installation of X2Go Server and Client on Debian 8

This part of the process will require setting up the X2Go server as well as an X2Go client in order to have a remote desktop connection. The guide will start first with the server setup and then proceed to the client setup.

X2Go Server Installation

The server in this tutorial will be the Debian 8 system running LXDE. The start of the installation process, is to install the X2Go Debian repository and obtain the GPG keys. The first step is to obtain the keys which can be easily accomplished the apt.

# apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E

Once the keys have been obtained, a repository file needs to be created for apt to look for the X2Go packages at a specific repository location. This can all be accomplished with one simple command that creates the needed apt list file and puts the appropriate entry into that file.

# echo "deb http://packages.x2go.org/debian jessie main" >> /etc/apt/sources.list.d/x2go.list
# apt-get update

The above commands will instruct apt to search this newly provided repository for packages and more specifically the X2Go packages. At this point, the system is ready to have the X2Go server installed using the apt meta-packager.

# apt-get install x2goserver

At this point the X2Go server should be installed and started. It is always a good idea to confirm that installed servers are running though.

# ps aux | grep x2go
Confirm X2Go Server Installed and Running

Confirm X2Go Server Installed and Running

In the event that the system doesn’t automatically start X2Go, run the following command to attempt to start the service.

# service x2goserver start

At this point the basic server configuration should be done and the system should be waiting for connections from the X2Go client system.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Rob Turner

Rob Turner is an avid Debian user as well as many of the derivatives of Debian such as Devuan, Mint, Ubuntu, and Kali. Rob holds a Masters in Information and Communication Sciences as well as several industry certifications from Cisco, EC-Council, ISC2, Linux Foundation, and LPI.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

9 Responses

  1. Frank says:

    Hi,
    how can I keep the session on the server alive after disconnect the client?

    • Rob Turner says:

      Frank,

      Greetings. To attempt to keep the session alive after a client disconnect, you can ‘suspend’ the session. To do this go back to the X2GO client window (not the window that has the other machines desktop) and select the ‘suspend’ button for the session you wish to disconnect. I haven’t tested this feature extensively or on multiple desktop environments but it seems relatively stable on a LXDE Devuan system.

  2. kosta says:

    hi, what about ssh AllowUsers for connections x2go?

    • Rob Turner says:

      Kosta,

      Greetings and sorry for the delay. I wanted to confirm that it worked before replying. I tested the ‘AllowUsers’ option in SSHD and it does indeed prevent users not in the list of allowed users from accessing an x2go server.

  3. Nick says:

    Hello!
    Do you use x2go on the production environment, it stable ?

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.