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.868

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
http://tweakers.net/ext/f/rk2AEsrNr48qhJK2GudIEaUW/full.png
(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
http://tweakers.net/ext/f/JER0t4yKkYcqKzC8Khg9jySd/full.png

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
http://tweakers.net/ext/f/ZonSoyAN0cHAn304bsJ5bwvg/full.png

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

http://tweakers.net/ext/f/N895zBUk6Mi0XXahKFaQdXNC/full.png

5. If no errors occur we can make the source
make
http://tweakers.net/ext/f/xZV9EmIiXshsUnbi6OGFNQO9/full.png

6. And install Guacamole server:
make install
http://tweakers.net/ext/f/CLEvcOIjEBg59cBNJ4zlOho1/full.png

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

http://tweakers.net/ext/f/RbF82KACzw4E4JLDEi0RqbaE/full.png

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

http://tweakers.net/ext/f/aTgGuf3tnF7T8whXDAE8vQw2/full.png

9. Enter the following info into /etc/guacamole/guacamole.properties
# 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
auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider

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

http://tweakers.net/ext/f/jQXV6koBmkFvvftv16nrXrbZ/full.png

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.
http://tweakers.net/ext/f/msngqPQtcPogczOF2qocta9I/full.png

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/guacamole.properties /usr/share/tomcat7/.guacamole
cp guacamole-0.8.3.war /var/lib/tomcat7/webapps/guacamole.war

http://tweakers.net/ext/f/OiyP7LhumBrWlOkXNA2g7y5O/full.png

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

http://tweakers.net/ext/f/mObF1pTGYXQswAIaaukjVLkp/full.png

13. Now connect to http://[ipadres]:8080 and login with the username supplied in step 10!
http://tweakers.net/ext/f/7urwaCQYidQ0cyyUdocnBWgk/full.png

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

Volgende: No more logmein Free? OpenSource to the rescue! Part 2:Securing Guacamole and exposing it to the Web 02-'14 No more logmein Free? OpenSource to the rescue! Part 2:Securing Guacamole and exposing it to the Web
Volgende: Ads blocken met je eigen DNS server (3) 12-'13 Ads blocken met je eigen DNS server (3)

Reacties


Door Tweakers user Pinky-H9, woensdag 22 januari 2014 12:43

Does it support multiple monitors? As we work with desktops of 35K Pixel x 4k Pixel in some cases.

Door Tweakers user Tomba, woensdag 22 januari 2014 12:46

Pinky-H9 schreef op woensdag 22 januari 2014 @ 12:43:
Does it support multiple monitors? As we work with desktops of 35K Pixel x 4k Pixel in some cases.
It should work (when using VNC) but you'd have to test to make sure. I do not have a dual monitor available here to test so can't be sure...

Door Tweakers user Pinky-H9, woensdag 22 januari 2014 12:56

In our case it are bit more then dual monitor :) (Certain installations up to 32 times 1920x1080 on one system)

Anyway will create a linux system and will giv it a go as we now use teamviewer what is working good. We look for a cheaper alternative as our licenses are for V8 and for V9 we need to buy new ones and their pricing is not that good even when upgrading.

Door Tweakers user Tomba, woensdag 22 januari 2014 12:58

Pinky-H9 schreef op woensdag 22 januari 2014 @ 12:56:
In our case it are bit more then dual monitor :) (Certain installations up to 32 times 1920x1080 on one system)

Anyway will create a linux system and will giv it a go as we now use teamviewer what is working good. We look for a cheaper alternative as our licenses are for V8 and for V9 we need to buy new ones and their pricing is not that good even when upgrading.
I'd be interested to hear if this works! 32 times 1920x1080 is pretty sick LOL

Door Tweakers user br men, woensdag 22 januari 2014 14:57

I'm curious to what this 32 monitor setup is being used for

Door Tweakers user Weezer-DC, woensdag 22 januari 2014 15:09

Another logmein free user here, was thinking about logmein central that costs 199 the first year and following years 299.

But I found lots of topics and gonna test out ScreenConnect.

http://www.screenconnect.com/Remote-Support

It runs on your own server zo no SaaS/cloud solution.
Cost are 325 dollar for a license (1 active session) that will never expire, updates will costs extra.

[Reactie gewijzigd op woensdag 22 januari 2014 15:09]


Door Tweakers user i-chat, woensdag 22 januari 2014 15:15

im wondering what this is supposed to do is it an alternative for terminal services via a gateway,
i can i actually tell a person that needs assistance to browse to http://myserver i never really understood the logic behind logmein anyway, if you have access to the computers you need to remotely monity than setting up a vnc server is easy....

its when the computer isn't yours you get into trouble, trying to explain john idiot doe how to install any vnc server on while talking on the phone... its just not gon work.. and i really dont see a reason why you want to run tomcat for something as simple as a vnc client...

Door Tweakers user Tomba, woensdag 22 januari 2014 15:33

i-chat schreef op woensdag 22 januari 2014 @ 15:15:
im wondering what this is supposed to do is it an alternative for terminal services via a gateway,
i can i actually tell a person that needs assistance to browse to http://myserver i never really understood the logic behind logmein anyway, if you have access to the computers you need to remotely monity than setting up a vnc server is easy....

its when the computer isn't yours you get into trouble, trying to explain john idiot doe how to install any vnc server on while talking on the phone... its just not gon work.. and i really dont see a reason why you want to run tomcat for something as simple as a vnc client...
Thanks for your reply, but apparently you are missing the point ;) For ad hoc help Teamviewer still is king. This solution is to reach computers you need to regularly access remotely. So shortly; it's an alternative to logmein free :)

Door Tweakers user Weezer-DC, woensdag 22 januari 2014 15:36

For that I have a small .exe of 300kb thats functions as a VNC server.
I placed it on my company website so consumers can download en run it easily.
The exe is pre config for my vnc server so I have a connection in 10 seconds.

But when you want to connect to pc's for maintenance you need something thats already running on the target pc(s) and that was handy with logmein.

[Reactie gewijzigd op woensdag 22 januari 2014 15:37]


Door Tweakers user Pinky-H9, woensdag 22 januari 2014 19:15

As i work for a company that makes videowall processors quite obvious why we need so many screens :) Just take a look at eyevis.de and check the netPIX will explain all.

Door Tweakers user RobIII, woensdag 22 januari 2014 19:58

Pinky-H9 schreef op woensdag 22 januari 2014 @ 19:15:
As i work for a company that makes videowall processors quite obvious why we need so many screens :) Just take a look at eyevis.de and check the netPIX will explain all.
Wow, look at that: you can directly link to pages. That's so Web 2.0 :D _O_

Door Tweakers user Pinky-H9, donderdag 23 januari 2014 09:07

At step 11 i get stuck (sorry i am no linux expert :))
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/guacamole.properties /usr/share/tomcat7/.guacamole
cp guacamole-0.8.3.war /var/lib/tomcat7/webapps/guacamole.war
Cp tells me
Cannot stat 'guacamole etc etc etc : No such file or directory

Door Tweakers user Tomba, donderdag 23 januari 2014 09:19

Pinky-H9 schreef op donderdag 23 januari 2014 @ 09:07:
At step 11 i get stuck (sorry i am no linux expert :))

[...]


Cp tells me
Cannot stat 'guacamole etc etc etc : No such file or directory
You probably are not in the directory where guacamole-0-8-3.war is located. If you enter the command ls does it show the file?

Door Tweakers user Pinky-H9, donderdag 23 januari 2014 09:54

Hmmmm strange the tomcat7/webapps is empty grrrrr

Door Tweakers user Tomba, donderdag 23 januari 2014 10:22

Pinky-H9 schreef op donderdag 23 januari 2014 @ 09:54:
Hmmmm strange the tomcat7/webapps is empty grrrrr
That's strange, there should at least be a ROOT directory (for the standard Tomcat management tools) in /var/lib/tomcat7/webapps/ .
Is Tomcat even running? (try 'service tomcat7status')
It doesn't really matter though because you don't actually need it to use Guacamole. Just copy the war file to /var/lib/tomcat7/webapps/ and restart Tomcat7. Then you should be able to open http://server:8080/guacamole

Door Tweakers user King4589, donderdag 23 januari 2014 14:26

The screen-shots for step 4 and 5 are the same. And maybe a blank line before each step would make it all look a bit nicer.

Door Tweakers user Tomba, donderdag 23 januari 2014 15:00

King4589 schreef op donderdag 23 januari 2014 @ 14:26:
The screen-shots for step 4 and 5 are the same. And maybe a blank line before each step would make it all look a bit nicer.
Thanks! Changed accordingly :)

Door Tweakers user Faddermakker, woensdag 29 januari 2014 15:37

Did you use, by any chance, a raspberry pi for this?
edit: nvm I just realized that you used ubuntu and nog debian. In the comming week I'll try to get this running on a Pi :) will report back

[Reactie gewijzigd op woensdag 29 januari 2014 15:39]


Door Tweakers user Tomba, dinsdag 4 februari 2014 08:19

Rooke schreef op woensdag 29 januari 2014 @ 15:37:
Did you use, by any chance, a raspberry pi for this?
edit: nvm I just realized that you used ubuntu and nog debian. In the comming week I'll try to get this running on a Pi :) will report back
I didn't use a Pi but a VM on my Hyper-V server. Nonetheless it should work largely the same because Raspbian and Ubuntu are both based on Debian.

Door Tweakers user Clementine, maandag 10 februari 2014 12:23

Isn't Teamviewer just as good and free?

Door Tweakers user Tomba, maandag 10 februari 2014 13:09

Clementine schreef op maandag 10 februari 2014 @ 12:23:
Isn't Teamviewer just as good and free?
Depends on what you call good :)
I wanted to have a solution I myself control and not be pestered by the next company who decides they want my money :) Also; AFAIK Teamviewer doesn't work on Linux.

[Reactie gewijzigd op maandag 10 februari 2014 13:10]


Door Tweakers user Jogai, woensdag 12 februari 2014 09:43

The ppa serves 0.8.3. Its way easier that way..

Door Tweakers user Tomba, woensdag 12 februari 2014 10:02

Jogai schreef op woensdag 12 februari 2014 @ 09:43:
The ppa serves 0.8.3. Its way easier that way..
It didn't for me, when I apt-get installed guacamole I got version 0.6 (see step 2 of this guide)

Check here if you don't believe me.

Ah now I see what you mean:
Stable Releases PPA

[Reactie gewijzigd op woensdag 12 februari 2014 11:54]


Door Tweakers user hyptonize, maandag 21 april 2014 21:31

Ik was wat verward, ik dacht dat je Windows draaide namelijk. Maar dit is blijkbaar een skin van Ubuntu?

Door Tweakers user Tomba, maandag 21 april 2014 22:24

hyptonize schreef op maandag 21 april 2014 @ 21:31:
Ik was wat verward, ik dacht dat je Windows draaide namelijk. Maar dit is blijkbaar een skin van Ubuntu?
De server waar Guacamole op geÔnstalleerd is draait Ubuntu (zonder XWindows), mijn laptop draait Windows 8 en daar zijn de PuTTY screenshots ook op gemaakt.

Reageren is niet meer mogelijk