Difference between revisions of "Guacamole 0.3.0 on Ubuntu 10.04"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
 
(37 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Guacamole is a [[program]] to tunnel a Linux desktop to a browser.
+
= Overview =
 +
Guacamole is a [[program]] to [[control a Linux desktop]] over the [[network]] in a browser.
  
Sometimes in your Linux life, you need to control your servers in the internet with a graphical user interface. The problem is when you are behind a corporate firewall blocking ssh requests to the public internet. Typical corporate firewalls only allow proxified client access to port 80 and 443 in the public internet. The solution is to use a browser to display a Linux desktop. The solution is not, however, to use [[Vnc#for_a_web_browser]], as it will still need a port that will be blocked by corporate firewalls.
+
Sometimes in your Linux life, you need to control your servers in the internet with a graphical user interface. This is tedious when you are behind a corporate firewall blocking ssh requests to the public internet. Typical corporate firewalls only allow proxified client access to port 80, 8080 and 443 in the public internet. One way to go is to use a browser to display a Linux desktop. The solution is not, however, to use [[Vnc#for_a_web_browser|VNC for a web browser]], as it will be blocked by corporate firewalls. The solution is [http://guacamole.sourceforge.net/ guacamole].
  
 +
[[File:Snapshot-guacamole.png|250px]]
 +
 +
= Quickstart =
 
Here is what I did to configure Guacamole on 2011-06-25 using a [[rackspace]] server with Ubuntu 10.04 x64:
 
Here is what I did to configure Guacamole on 2011-06-25 using a [[rackspace]] server with Ubuntu 10.04 x64:
  
* install some software
+
* install some [[dependencies]]
 +
apt-get update
 
  apt-get install tomcat6 libvncserver0
 
  apt-get install tomcat6 libvncserver0
  
* download a package from [http://sourceforge.net/projects/guacamole/files/testing/binary/linux-x86-64/ubuntu-10.04/bundle/guacamole-0.3.0-ubuntu-10.04-x86-64.tar.gz/download here]
+
* download [http://sourceforge.net/projects/guacamole/files/testing/binary/linux-x86-64/ubuntu-10.04/bundle/guacamole-0.3.0-ubuntu-10.04-x86-64.tar.gz/download this package]
 +
 
 +
* [[unpack]] it
 +
[[tar]] xvzf guacamole-0.3.0-ubuntu-10.04-x86-64.tar.gz
 +
 
 +
* [[install]] the contained software
 +
cd guacamole-0.3.0-ubuntu-10.04-x86-64
 +
[[dpkg]] -i *.deb
 +
 
 +
* put the software to the right place
 +
ln -s /var/lib/guacamole/guacamole.war /var/lib/tomcat6/webapps
 +
ln -s /etc/guacamole/guacamole.properties /var/lib/tomcat6/common/classes
  
 
* edit /etc/guacamole/user-mapping.xml
 
* edit /etc/guacamole/user-mapping.xml
 +
<pre>
 +
<user-mapping>
 +
  <authorize username="user" password="password">
 +
      <protocol>vnc</protocol>
 +
        <param name="hostname">localhost</param>
 +
        <param name="port">5901</param>
 +
        <param name="password">password</param>
 +
    </authorize>
 +
</user-mapping>
 +
</pre>
 +
: This will allow you to log in as user named ''user'' with the password ''password''. A VNC service must be listening on port 5901 configured with the password ''password''.
  
 
* install a vnc server
 
* install a vnc server
Line 17: Line 44:
 
* start the vnc server
 
* start the vnc server
 
  vncserver
 
  vncserver
 +
 +
= Test it =
 +
* surf to your Linux desktop: http://localhost:8080/guacamole/
 +
 +
= Bind it to port 80 =
 +
Now I want guacamole to be reachable from within a typical corporate network, so I want it to be on port 80. To do this I edit /etc/apache2/sites-enabled/000-default and add a section:
 +
<pre>
 +
  <IfModule mod_proxy.c>
 +
    <Location /guacamole>
 +
      ProxyPass http://50.57.109.216:8080/guacamole
 +
    </Location>
 +
  </IfModule>
 +
</pre>
 +
If you are using Apache2 and you have mod_proxy this section will make that any browser request to http://yourserver/guacamole will be served using port 8080 as proxy port.
 +
 +
= Get a better desktop environment =
 +
If you want to see a desktop environment (rather than gray background), best modify your .vnc/xstartup to be like this:
 +
#!/bin/sh
 +
xrdb $HOME/.Xresources
 +
xsetroot -solid grey
 +
export XKL_XMODMAP_DISABLE=1
 +
gnome-session &
 +
This will start gnome. Several tests have shown KDE will not work. Also, if you use Ubuntu 11.10 or later, the command gnome-session will not start the complete gnome session.
  
 
= See also =
 
= See also =
 +
* [[connect to a Linux computer]]
 +
* [[guacamole 0.8 on SUSE]]
 +
* [[guacamole]]
 +
* [[cool things]]
 
* http://guac-dev.org/Debian%20Install%20Instructions
 
* http://guac-dev.org/Debian%20Install%20Instructions
 +
* ulteo
  
{{stub}}
+
[[Category:Tool]]
 +
[[Category:Webmaster]]

Latest revision as of 02:55, 16 December 2013

Overview

Guacamole is a program to control a Linux desktop over the network in a browser.

Sometimes in your Linux life, you need to control your servers in the internet with a graphical user interface. This is tedious when you are behind a corporate firewall blocking ssh requests to the public internet. Typical corporate firewalls only allow proxified client access to port 80, 8080 and 443 in the public internet. One way to go is to use a browser to display a Linux desktop. The solution is not, however, to use VNC for a web browser, as it will be blocked by corporate firewalls. The solution is guacamole.

Snapshot-guacamole.png

Quickstart

Here is what I did to configure Guacamole on 2011-06-25 using a rackspace server with Ubuntu 10.04 x64:

apt-get update
apt-get install tomcat6 libvncserver0
tar xvzf guacamole-0.3.0-ubuntu-10.04-x86-64.tar.gz
cd guacamole-0.3.0-ubuntu-10.04-x86-64
dpkg -i *.deb
  • put the software to the right place
ln -s /var/lib/guacamole/guacamole.war /var/lib/tomcat6/webapps
ln -s /etc/guacamole/guacamole.properties /var/lib/tomcat6/common/classes
  • edit /etc/guacamole/user-mapping.xml
<user-mapping>
   <authorize username="user" password="password">
      <protocol>vnc</protocol>
         <param name="hostname">localhost</param>
         <param name="port">5901</param>
         <param name="password">password</param>
    </authorize>
</user-mapping>
This will allow you to log in as user named user with the password password. A VNC service must be listening on port 5901 configured with the password password.
  • install a vnc server
apt-get install tightvncserver
  • start the vnc server
vncserver

Test it

Bind it to port 80

Now I want guacamole to be reachable from within a typical corporate network, so I want it to be on port 80. To do this I edit /etc/apache2/sites-enabled/000-default and add a section:

  <IfModule mod_proxy.c>
    <Location /guacamole>
      ProxyPass http://50.57.109.216:8080/guacamole
    </Location>
  </IfModule>

If you are using Apache2 and you have mod_proxy this section will make that any browser request to http://yourserver/guacamole will be served using port 8080 as proxy port.

Get a better desktop environment

If you want to see a desktop environment (rather than gray background), best modify your .vnc/xstartup to be like this:

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
gnome-session &

This will start gnome. Several tests have shown KDE will not work. Also, if you use Ubuntu 11.10 or later, the command gnome-session will not start the complete gnome session.

See also