How to install X2Go Server on Ubuntu

X2Go Server/Client Installation and Configuration on Ubuntu 15.10

The remote desktop session get sniffed through malicious users, when the remote traffic not encrypted. For such inherent security risks X2Go tunnels the remote desktop session through secure shell (SSH). This tutorial covers the installation of X2Go server/client.

Characteristics of X2Go

  • Sound support
  • Traffic is Securely Tunneled through SSH
  • Centralized configuration and load balancing
  • Graphical remote desktop control
  • Access a Windows computer
  • File and printer sharing from client to server
  • Easily select from multiple desktop environments
  • Thin client environment
  • Remote support via Desktop Sharing
  • Connects and disconnects to session from client

Requirements

  • Another Linux client required to install the X2Go client software
  • Network connection with installed OpenSSH-Server

To Install X2Go Server on Ubuntu 15.10

Before the installation process we should update the system and run the following command.

user1@linuxhelp:~$ sudo apt-get update
[sudo] password for user1: 
Hit http://ppa.launchpad.net trusty InRelease                                  
Ign http://extras.ubuntu.com trusty InRelease                                  
Ign http://in.archive.ubuntu.com trusty InRelease                    
Hit http://ppa.launchpad.net trusty/main amd64 Packages              
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB] 
Hit http://extras.ubuntu.com trusty Release.gpg                                
Get:2 http://in.archive.ubuntu.com trusty-updates InRelease [65.9 kB]          
Hit http://ppa.launchpad.net trusty/main i386 Packages                         
.             
.
.       
Ign http://in.archive.ubuntu.com trusty/universe Translation-en_IN             
Fetched 5,205 kB in 1min 27s (59.5 kB/s)                                       
Reading package lists... Done

To enable repository for X2Go server

Execute the below commands to enable the repository for X2Go server

user1@linuxhelp:~$ sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  python3-pycurl python3-software-properties unattended-upgrades
Suggested packages:
  libcurl4-gnutls-dev python3-pycurl-dbg bsd-mailx mail-transport-agent
The following NEW packages will be installed:
  python3-pycurl python3-software-properties software-properties-common
  unattended-upgrades
0 upgraded, 4 newly installed, 0 to remove and 11 not upgraded.
Need to get 0 B/102 kB of archives.
After this operation, 800 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
..
..
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Setting up python3-software-properties (0.92.37.7) ...
Setting up software-properties-common (0.92.37.7) ...

Run the sudo command to add the repository of X2go.

user1@linuxhelp:~$ sudo add-apt-repository ppa:x2go/stable
Quick howto to turn your machine into an X2Go server:

sudo apt-add-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession
sudo apt-get install x2gomatebindings # if you use MATE/mubuntu
sudo apt-get install x2golxdebindings # if you use LXDE/lubuntu

Quick howto to install the x2goclient:

sudo apt-add-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goclient

Enjoy!
 More info: https://launchpad.net/~x2go/+archive/ubuntu/stable
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp5msd91xx/secring.gpg'  created
gpg: keyring `/tmp/tmp5msd91xx/pubring.gpg'  created
gpg: requesting key 0A53F9FD from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp5msd91xx/trustdb.gpg: trustdb created
gpg: key 0A53F9FD: public key " Launchpad PPA for x2go"  imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK

To install the X2Go server

Before starting the installation process let us update the packages using apt-get update.

user1@linuxhelp:~$ sudo apt-get update
Hit http://ppa.launchpad.net trusty InRelease                                  
Ign http://extras.ubuntu.com trusty InRelease                                  
Ign http://in.archive.ubuntu.com trusty InRelease                    
Hit http://ppa.launchpad.net trusty/main amd64 Packages              
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]           
Hit http://ppa.launchpad.net trusty/main i386 Packages                         
Get:2 http://in.archive.ubuntu.com trusty-updates InRelease [65.9 kB]          
Get:3 http://extras.ubuntu.com trusty Release.gpg [72 B]                       
Hit http://ppa.launchpad.net trusty/main Translation-en                        
.
.
.                      
Hit http://in.archive.ubuntu.com trusty/universe Translation-en                
Ign http://in.archive.ubuntu.com trusty/main Translation-en_IN                     
Ign http://in.archive.ubuntu.com trusty/universe Translation-en_IN             
Fetched 4,314 kB in 35s (120 kB/s)                                             
Reading package lists... Done

Once the update process is completed, you can install x2goserver.

user1@linuxhelp:~$ sudo apt-get install x2goserver x2goserver-xsession
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libcapture-tiny-perl libconfig-simple-perl libdbd-pg-perl
  libxcompext3 libxcompshad3 nx-x11-common nxagent pwgen sshfs x2goagent
  x2goserver-extensions
Suggested packages:
  x2goserver-printing x2goserver-compat x2goserver-fmbindings
  x2goserver-pyhoca rdesktop
The following NEW packages will be installed:
.
.
.
Setting up pwgen (2.06-1ubuntu4) ...
Setting up x2goagent (2:3.5.0.32-0~668~ubuntu15.10.1) ...
Setting up x2goserver (4.0.1.19-0~1064~ubuntu15.10.1) ...
Group x2gouser already exists.
User x2gouser already exists.
 * Cleaning up stale X2Go sessions.
Setting up x2goserver-extensions (4.0.1.19-0~1064~ubuntu15.10.1) ...
Setting up x2goserver-xsession (4.0.1.19-0~1064~ubuntu15.10.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.7) .

Now the installation of X2Go server is successfully completed.

To install Graphical desktop environment

The below command is used to install the Graphical desktop environment.

user1@linuxhelp:~$ sudo apt-get install xfce4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
..
..
Preparing to unpack .../archives/xfce4_4.10.1_all.deb ...
Unpacking xfce4 (4.10.1) ...
Setting up xfce4 (4.10.1) ...

After that you must reboot your system to apply the changes

user1@linuxhelp:~$ sudo reboot

Installation of X2Go Client

Installation of X2Go Client is easier than the server installation, because it is default package in the Ubuntu machine.

user1@linuxhelp:~$ sudo apt-get install x2goclient
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
..
..
processing triggers for ureadhead (0 ,100. 0.19)&hellip 
processing triggers for ureadhead (225-1ubuntu 9)&hellip 

To open the x2goclient on command line

Type the below command in terminal to open x2goclient on command line

user1@linuxhelp:~$ x2goclient

Once the X2Go client is launched, initial windows will be displayed to connect the Debian Server

Session Preferences

At this window create new session, enter the Ubuntu system’ s IP address in the “ server field” and enter the user name in next box.

Next select the XFCE from the drop down in the “ Session Type” at the bottom.

Finally click the “ OK” button at the bottom to finish the Session settings.

To activate the newly created session

The newly created session can be activated by clicking on the X2Go Client window in right hand side.

X2Go Server client Session

After selecting the session, it will prompt for the user on the remote machine’ s identification and these will be the user on the Ubuntu server’ s identification.

X2Go Server Login

X2Go Screen Appearance

Once the password is verified then system will display the remote system’ s graphical display on the client system with scalable window.

Welcome Panel

Backups

Application Menu

FAQ
Q
Can I use x2goprint with Windows Clients?
A
To set a print target, you'll need x2goclient. For example you can use the RDP tunneling feature of X2Go.
Q
What does X2Go does/ exactly
A
It creates secure ssh for remote seesion
Q
I'm getting dpkg lock while installing x2go software
A
use rm -rf to remove the lock file
Q
I need graphical enviornment to work with!!!
A
apt-get install xfce4
Q
Client side setup please?
A
First install "apt-get install x2goclient" and launch it via "x2goclient" client