Category: Remote desktop

Guacamole: clientless remote desktop – latest version tutorial on Ubuntu/Xubuntu 14.04/16.04

Guacamole website:

Guacamole user guide:



Required dependencies:

sudo apt install libcairo2-dev libjpeg-dev libpng12-dev libossp-uuid-dev libavcodec-dev libswscale-dev

Optional dependencies for VNC, RDP, SSH, and Telnet support:

sudo apt install libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev

Required dependency in order to launch the configure script:

sudo apt install libtool


Source code

Stable releases download:

tar -xzf guacamole-server-0.9.9.tar.gz
mv guacamole-server-0.9.9 guacamole-server

or latest Github revision:

git clone guacamole-server

Enter source folder

cd guacamole-server

Only for Github source: files downloaded directly from git will not contain the configure script, as autogenerated code is not included in the project’s repositories. So we need an extra package to be installed:

sudo apt install autoconf libtool

and generate configure manually:

autoreconf -fi


Build and install

./configure --with-init-dir=/etc/init.d

The --with-init-dir=/etc/init.d shown above prepares the build to install a startup script for guacd into the /etc/init.d directory, such that we can later easily configure guacd to start automatically on boot.

sudo make install
sudo ldconfig
cd ..



Required dependencies: we need the Tomcat servlet container, website:

sudo apt install tomcat7

To compile we need Maven and the Java SDK (called JDK) because the Java JRE (jre-default) is not enough:

sudo apt-get install maven default-jdk


Source code

Download the stable release

tar -xzf guacamole-client-0.9.9.tar.gz
mv guacamole-client-0.9.9 guacamole-client

or latest revision from Github:

git clone guacamole-client
cd guacamole-client


Build and install

Ready to compile the java package:

mvn package

Move and rename the webapp to simplify the resulting URL

sudo cp guacamole/target/guacamole-0.9.10-incubating.war /var/lib/tomcat7/webapps/guacamole.war
cd ..



Create the configuration folder

sudo mkdir /etc/guacamole

Link our configuration folder to guacamole’s default location

sudo ln -s /etc/guacamole /usr/share/tomcat7/.guacamole

Create the properties file

sudo mousepad /etc/guacamole/

and edit as follow:

# Hostname and port of guacamole proxy
guacd-hostname: localhost
guacd-port: 4822

# Location to read extra .jar's from
lib-directory: /var/lib/tomcat7/webapps/guacamole/WEB-INF/classes

# Authentication provider class

# Properties used by BasicFileAuthenticationProvider
basic-user-mapping: /etc/guacamole/user-mapping.xml

Create the client’s list

sudo mousepad /etc/guacamole/user-mapping.xml

edit as u need, the reference is here:

Example: (authorize username and password can be left empty for anonymous login)

    <authorize username="admin" password="admin">
        <!-- RDP - Remotedesktop -->
        <!-- Parameters explained here: -->

        <connection name="Redmond OS7 RDP (simple login)">
                <param name="hostname"></param>      <!-- FQDN or host IP -->
                <param name="port">2389</param>                   <!-- Port, Standard is 3389 -->
                <param name="disable-audio">true</param>          <!-- disable audio -->

        <connection name="Redmond OS7 RDP (extended login)">
                <param name="hostname"></param>      <!-- FQDN or host IP -->
                <param name="port">3389</param>                   <!-- Port, Standard is 3389 -->
                <param name="username">cesare</param>       <!-- Login -->
                <param name="password">cesare</param>        <!-- Password -->
        <param name="domain">mydomain.local</param>              <!-- Domain -->
                <param name="disable-audio">true</param>          <!-- disable audio -->
                <param name="server-layout">it-it-qwerty</param>  <!-- IT keyboard layout -->
        <connection name="Linux Mint 18 VM">
                <param name="hostname"></param>      <!-- FQDN or host IP -->
                <param name="port">3389</param>                   <!-- Port, Standard is 3389 -->
                <param name="disable-audio">true</param>          <!-- disable audio -->

        <!-- WebSSH -->
        <!-- Parameters explained here: -->
        <connection name="SSH Server #1">
                <param name="hostname"></param>      <!-- FQDN or host IP -->
                <param name="port">22</param>                     <!-- Port, standard is 22 -->
                <param name="username">myname</param>             <!-- login -->
                <param name="password">mypassword</param>        <!-- password -->
                <param name="color-scheme">green-black</param>        <!-- set the color scheme -->
                <param name="font-name">Ubuntu Mono</param>        <!-- set the font family -->



Services start

14.04 releases

sudo service tomcat7 restart
sudo service guacd start

16.04 releases

sudo systemctl restart tomcat7
sudo systemctl start guacd


Connect to Guacamole

Browse to:



Enable Guacamole to run at startup

14.04 releases

sudo update-rc.d tomcat7 defaults
sudo update-rc.d guacd defaults

16.04 releases

sudo systemctl enable tomcat7
sudo systemctl enable guacd


How to find out the actual screen resolution from a shell script

When I have to personalize the settings of my FreeNX client, I have to know which resolution should I set in order to get a maximized window which perfectly fit my desktop. Once I get connected to my remote desktop and having its window resized, I get the new resolution with:

xdpyinfo  | grep dimensions
dimensions:    3200x1200 pixels (847x318 millimeters)


xrandr -q | grep current
Screen 0: minimum 8 x 8, current 3200 x 1200, maximum 8192 x 8192

How to change the port on NX server

NX Server is a complete solution for remote access to your Linux workstation. NoMachine offers a free version which allows 2 users to connect at the same time no matter what their location is, and share the desktop. NX Server runs over SSH so you don’t need to open any other ports on your firewall other than the port for the SSH service.

It is considered a good security practice to change the default port the SSH service listens on. When you change this port it breaks the NX Server service since it expects the SSH service to be running on the default port of 22. You can fix NX Server by modifying the following file:


Look for the following settings in the file:

SSHDPort = "22"
SSHDAuthPort = "22"

Change “22″ to whatever port your SSH service is now listening on. You’ll then need to restart the NX Server service to put the changes into effect:

/etc/init.d/nxserver restart

WordPress Themes