March 14, 2020, 10:44 p.m.

Installation of Apache Guacamole to Debian 10 Buster

[Apache Guacamole](https://guacamole.apache.org/0 is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH.

We call it clientless because no plugins or client software are required.

Thanks to HTML5, once Guacamole is installed on a server, all you need to access your desktops is a web browser.

I wanted to try Apache Guacamole for remote accessing my HP Thin Client T610 PC, but Debian does not have a ready to install package for it. Luckily, I found a github project that will automatically install Guacamole Server for us, it can be found on: https://github.com/MysticRyuujin/guac-install.

Here are the steps that I followed:

According to the github README, download the script and execute it under sudo. **CAUTION: BEFORE RUNNING A SCRIPT THAT CAME FROM SOMEWHERE, YOU NEED TO MAKE SURE THAT IT WON’T DO ANYTHING DESTRUCTIVE TO YOUR SYSTEM OR FILES. I WOULD SUGGEST THAT YOU READ THE SCRIPT BEFORE EXECUTING IT

$ wget https://git.io/fxZq5
$ mv fxZq5 guac-install.sh
$ chmod +x guac-install.sh

Run the script to install guacamole:

$ sudo ./guac-install.sh

The script will ask you whether to enable Multi Factor Authentication like TOTP (Time based One Time Password, like what other web services do. It will display 6 digit code for 1 minute until it renews).
It will also ask to specify whether MySQL server will be installed or specify the existing remote MySQL server.

Due to my slow internet the installation failed in the apt installation phase, and I was able to install the requisite packages myself by reading the log file of guacamole’s script at /tmp/gua*

Here are the packages that I installed manually after reading it from the log file:

sudo apt install   default-mysql-server freerdp2-dev freerdp2-x11 galera-3 gir1.2-harfbuzz-0.0   libapr1 libavcodec-dev libavutil-dev libcairo-script-interpreter2  libcairo2-dev libeclipse-jdt-core-java libev-dev libfontconfig1-dev libfreerdp-client2-2 libfreerdp-server2-2 libfreerdp-shadow-subsystem2-2  libfreerdp-shadow2-2 libfreerdp2-2 libfreetype6-dev libfribidi-dev libgnutls28-dev libgnutlsxx28 libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libice-dev libidn2-dev libogg-dev libossp-uuid-dev libp11-kit-dev libpango1.0-dev libpixman-1-dev libpulse-dev libsm-dev libssh2-1-dev libswresample-dev libswscale-dev libtasn1-6-dev libtasn1-doc  libtcnative-1 libtelnet-dev libtelnet2 libtomcat9-java libuv1-dev  libvncserver-config libvncserver-dev libvorbis-dev libwebp-dev libwebsockets-dev libwebsockets8 libwinpr-tools2-2 libwinpr2-2 libwinpr2-dev libxcb-shm0-dev libxft-dev libxrender-dev mariadb-server-10.3  mariadb-server-core-10.3 nettle-dev pango1.0-tools tomcat9 tomcat9-common  winpr-utils -dy

The command above downloads the deb files for installation but won’t install it.

I now executed the script the 3rd time, after entering the TOTP to Yes, MYSQL Server Installation to Yes and MYSQL Root Password and Guacamole database user password it proceeds to install automatically. Here is the output of the script:

$ sudo ./guac-install.sh 
MFA: Would you like to install TOTP? (y/N): y

MySQL is required for installation, if you're using a remote MySQL Server select 'n'
Would you like to install MySQL? (Y/n): Y

Enter localhost's MySQL root password: 
Confirm localhost's MySQL root password: 
Passwords don't match. Please try again.

Enter localhost's MySQL root password: 
~$ sudo ./guac-install.sh 
MFA: Would you like to install TOTP? (y/N): y

MySQL is required for installation, if you're using a remote MySQL Server select 'n'
Would you like to install MySQL? (Y/n): Y

Enter localhost's MySQL root password: 
Confirm localhost's MySQL root password: 

A new MySQL user will be created (guacamole_user)
Enter localhost's MySQL guacamole user password: 
Confirm localhost's MySQL guacamole user password: 

Updating apt...
libmysql-java not available. Will download 8.0.19 and install manually

Installing packages. This might take a few minutes...
OK
Downloading files...
guacamole-server-1.1.0.tar.gz         100%[======================================================================>]   1002K   618KB/s    in 1.6s    
Downloaded guacamole-server-1.1.0.tar.gz
guacamole-1.1.0.war                         0%[                                                                                   ]  39.34K  7.77KB/s    eta 22m 9guaguacamole-1.1.0.war                         0%[                                                                                   ]  42.08K  4.81KB/s    eta 28guacamguacamole-1.1.0.war                       100%[==================================================================================>]   9.08M  61.7KB/s    in 2m 46s  
Downloaded guacamole-1.1.0.war
guacamole-auth-jdbc-1.1.0.tar.gz          100%[==================================================================================>]  12.99M  57.8KB/s    in 4m 56s  
Downloaded guacamole-auth-jdbc-1.1.0.tar.gz
guacamole-auth-totp-1.1.0.tar.gz          100%[==================================================================================>]   3.67M  62.1KB/s    in 80s     
Downloaded guacamole-auth-totp-1.1.0.tar.gz
mysql-connector-java-8.0.19.tar.gz         66%[======================================================>                            ]   2.46M  18.6KB/s    eta 96s    ^mysql-connector-java-8.0.19.tar.gz        100%[==================================================================================>]   3.70M  35.4KB/s    in 3m 51s  
Downloaded mysql-connector-java-8.0.19.tar.gz
Downloading complete.

Building Guacamole-Server with GCC 8.3.0 
Configuring Guacamole-Server. This might take a minute...
OK
Running Make on Guacamole-Server. This might take a few minutes...
OK
Running Make Install on Guacamole-Server...
OK

Restarting tomcat service & enable at boot...
OK

Restarting MySQL service & enable at boot...
OK
mysql.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mysql

Restarting mysql...
OK
Checking MySQL for existing database (guacamole_db)
OK
Checking MySQL for existing user (guacamole_user)
OK
Adding database tables...
OK

Starting guacamole service & enable at boot...
guacd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable guacd

Cleanup install files...

Installation Complete
- Visit: http://localhost:8080/guacamole/
- Default login (username/password): guacadmin/guacadmin
***Be sure to change the password***.

After the installation you can now access the link:
http://localhost:8080/guacamole/

You now need to configure your client RDP, SSH, VNC and other connection for your target PC.

This post will be updated after I figure out how to properly configure guacamole’s connection.