So, let’s assume we have a fresh Ubuntu 22.04.x installation on a remote machine with DNS name test.example.org running a ssh server.
First, we become root:
Next, we install everything that is needed to run the Apache Tomcat server:
Now, on calling http://test.example.org:8080 we should see the standard Apache Tomcat “It works!” page.
As of April 2023, the current Guacamole version is 1.5.1, so we download the following files:
So we have server source code and client binary.
Now we unpack the server code
and compile it:
That should result in an output like this:
If that’s the case as all “yes”-entries are present, we can compile:
Last we have to configure the dynamic linker run-time bindings:
Now we can start the systemd service that the installation has provided:
which should give us an output like
We stop the server in order to amend configurations:
First we create the directory
There we create a file /etc/guacamole/guacamole.properties with the content
Of course we have to amend hostname, username, and password for our system.
The password hash can be created by
Finally, we have to append the Guacamole home to the environment:
It makes sense to reboot at this point.
Now we enable the Guacamole service for automated start:
Next, we install the client:
Then we have to link the property directory to the place where it is expected:
To speed up the tomcat restart, we have to create the following file
with this content:
Now we can start the guacamole server:
If we now browse to
we should be offered a login and then the connection options “SSH Admin” and “Terminal Server VNC”.
The SSH connection should work already, for the VNC we need to prepare some more things, as follows.
Install the VNC server
Let’s assume that we have a user test01 as our (sudo-enabled) standard user for the machine we just prepared, and that we are now logged in as that user.
We install the needed stuff:
Then we create a vnc password for our user:
Next, we have to create the vnc startup file in our home directory and make it executable:
The contents of this file is
For starting the VNC server on boot, we normally would need a service file /etc/systemd/system/vncserver@.service, as suggested by Install Xfce VNC remote desktop on Ubuntu. Unfortunately, for Ubuntu 22.04.x this method does not longer work (it will give some mysterious “/usr/bin/startxfce4: X server already running on display :1” log entry), and we have to find a workaround. This goes as follows:
We want to login automatically on boot, so we create a service unit /lib/systemd/system/getty@.service as follows:
In the Service section, we replace test01 by the username of our local user.
If the service should not be enabled by default, we make the service available at boot time by
To start the VNC server after the automatic login, we append the following line to our ~/.bashrc:
Time for a last reboot!
Then, we should be able to login to http://test.example.com:8080/guacamole with the credentials we stored in /etc/guacamole/user-mapping.xml, click on “Terminal Server VNC”, type in the VNC password we have defined before, and see a virtual XFCE screen in our browser.
That’s it! Now we have set up a Guacamole HTML5 remote XFCE desktop via VNC for Ubuntu 22.04.
For security reasons, it makes absolutely sense to add a 2FA as described in the already mentioned (german) article by Bernhard Linz. For security reasons, it makes also sense to map the Tomcat (http port 8080) via Apache or nginx reverse proxy to https, as described here in my blog.