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.
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
- Graphical remote desktop control.
- Tunneled through SSH.
- Sound support.
- File and printer sharing from client to server.
- Ability to access a single application rather than a whole desktop session.
- This guide assumes a working Debian 8 (Jessie) setup with LXDE (other desktop environments are support however; please see this link).
- Another Linux client to install the X2Go client software (This guide uses Linux Mint 17.1 with the Cinnamon desktop environment).
- Working network connection with openssh-server already installed and working.
- 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
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.
9 thoughts on “Installing and Configuring X2Go Server and Client on Debian 8”
how can I keep the session on the server alive after disconnect the client?
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.
hi, what about ssh AllowUsers for connections x2go?
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.
Do you use x2go on the production environment, it stable ?
Nick, Thanks for the reply. I personally use SSH to a CLI in production as I prefer the CLI over GUI’s. However from personal usage of X2Go around home, it has proven to be very stable.
ok, thank you Rob!
No problem. If you decide to use X2Go in a production environment, please share your experiences with us!
I really want to )
If my experiment will successful I will write to you.