No more logmein Free? OpenSource to the rescue! Part 1: Installing and configuring Guacamole

Door Tomba op woensdag 22 januari 2014 12:32 - Reacties (25)
CategorieŽn: Guacamole, Linux, Systeembeheer, Views: 15.376

Be sure to check out Part 2 and Part 3 of this guide as well :)

I am probably not the only Tweaker who has been using Logmein Free to get access to remote computers. It was easy to setup and allowed direct access to the console of the computer running Logmein. Very easy when helping friends or family who need regular support. Unfortunately logmein in all its wisdom has announced that the Free edition of Logmein is End of Life and will be unusable within one week. I briefly considered switching to one of the other solutions like Teamviewer, but hated to put my fate into the hands of yet another company able to pull support at any minute. I started looking around for a solution and found a great OpenSource solution: Guacamole!

Guacamole is a HTML5 remote desktop gateway, which allows VNC and RDP sessions to be made to specific systems without the need of installing any software on the Client. (Unfortunately Pango is broken in Ubuntu 13.10 so SSH connections won't be available) Nothing more is required than a web browser supporting HTML5 and AJAX.
This blog describes the steps required to configure and use Guacamole. As my Linux flavor of choice is Ubuntu all screenshots and steps are specific for that distro. For other distro's you might need other steps, see the Guacamole install guide for more info!

1. First we need to install all the prerequisites to use Guacamole:
apt-get install make libcairo2-dev libpng12-dev freerdp-x11 libssh2-1 libvncserver-dev libfreerdp-dev libvorbis-dev libssl0.9.8 gcc libssh-dev libpulse-dev tomcat7 tomcat7-admin tomcat7-docs
(libpango1.0-dev is broken in 13.10 so I won't install it meaning no SSH through Guacamole, this will be fixed in Ubuntu 14.04)

2. Because Ubuntu only has Guacamole 0.6.0 in the repositories (which does not support NLA for access to Windows 2012 Servers) we need to download the source of Guacamole Server by running the command
wget -O guacamole-server-0.8.3.tar.gz http://downloads.sourcefo...35644&use_mirror=optimate

3. As we are deploying on Tomcat7 we also need the War file:
wget -O guacamole-0.8.3.war http://downloads.sourcefo...390337127&use_mirror=garr

4. Now we unpack the source files of Guacamole server and we configure the package (Note by adding the --with-init-dir=/etc/init.d switch we prepare the build to install a startup script for guacd into the /etc/init.d directory)
tar -xzf guacamole-server-0.8.3.tar.gz
cd guacamole-server-0.8.3/
./configure --with-init-dir=/etc/init.d

5. If no errors occur we can make the source

6. And install Guacamole server:
make install

7. Now we tell Ubuntu to create the startupscript for Guacamole server and tell Ubuntu to rescan the libs
update-rc.d guacd defaults

8. Now it's time to create the settings files for Guacamole
mkdir /etc/guacamole
vi /etc/guacamole/

9. Enter the following info into /etc/guacamole/
# 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

10. Now edit the file /etc/guacamole/user-mapping.xml (below is an example to allow a user named adminstrator with password 1234 access to VNC on the host test) See Guacamoles own manual to find out what parameters you can enter.

11. Now we need to make the war and configuration file available to Tomcat7 by running
mkdir /usr/share/tomcat7/.guacamole
ln -s /etc/guacamole/ /usr/share/tomcat7/.guacamole
cp guacamole-0.8.3.war /var/lib/tomcat7/webapps/guacamole.war

12. All preparations are now done, so it's time to start Guacamole and restart Tomcat7
service guacd start
sudo service tomcat7 restart

13. Now connect to http://[ipadres]:8080 and login with the username supplied in step 10!

Go to Part 2 to see how to use Apache as a frontend and how to further secure your installation.