Difference between revisions of "Guacamole 0.8.3"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 3: Line 3:
 
* deploy it
 
* deploy it
 
  # mv guacamole-0.8.3.war /var/lib/tomcat6/webapps/
 
  # mv guacamole-0.8.3.war /var/lib/tomcat6/webapps/
 +
* surf to http://localhost:8080/guacamole-0.8.3. A folder /var/lib/tomcat6/webapps/guacamole-0.8.3 will be created with some content. We will need that later.
 
* download guacamole-server and guacamole-client from http://sourceforge.net/projects/guacamole/files/current/source/
 
* download guacamole-server and guacamole-client from http://sourceforge.net/projects/guacamole/files/current/source/
 
* unpack it
 
* unpack it
Line 14: Line 15:
 
  guacd[11581]: INFO:  Successfully bound socket to host ::1, port 4822
 
  guacd[11581]: INFO:  Successfully bound socket to host ::1, port 4822
 
  guacd[11581]: INFO:  Exiting and passing control to PID 11582
 
  guacd[11581]: INFO:  Exiting and passing control to PID 11582
* build the client:
 
apt-get install maven2
 
  
 +
* create a folder /etc/guacamole
 +
mkdir /etc/guacamole
 +
* create a file /etc/guacamole/guacamole.properties with the content
 +
# Hostname and port of guacamole proxy
 +
guacd-hostname: localhost
 +
guacd-port:    4822
 +
 +
# Location to read extra .jar's from
 +
lib-directory:  /var/lib/tomcat6/webapps/guacamole-0.8.3/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
 +
* create a file /etc/guacamole/user-mapping.xml with the content
 +
<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>
 +
 +
* find out your tomcat's user directory:
 +
# cat /etc/passwd|grep tomcat
 +
tomcat6:x:113:116::/usr/share/tomcat6:/bin/false
 +
: in this case it is /usr/share/tomcat6
 +
* create a folder .guacamole in your tomcat's user directory:
 +
mkdir /usr/share/tomcat6/.guacamole
 +
* link guacamole.properties into your tomcat's user directories' guacamole folder
 +
ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat6/.guacamole
 
* now the problem is that tomcat does not know where to find the Authentication class:
 
* now the problem is that tomcat does not know where to find the Authentication class:
  
Line 34: Line 67:
  
 
* works now. So the thing is:
 
* works now. So the thing is:
** you need to have guacamole.war in the right folder
 
** you need to have guacamole.properties in tomcat's home dir, e.g. /usr/share/tomcat6/.guacamole
 
 
** take care that it is called guacamole and not guacamole-0.8.3 (sure?)
 
** take care that it is called guacamole and not guacamole-0.8.3 (sure?)
 
** make sure the classpath in /etc/guacamole/guacamole.properties is correct, e.g.  
 
** make sure the classpath in /etc/guacamole/guacamole.properties is correct, e.g.  

Revision as of 09:41, 26 November 2013

Trying on Ubuntu 10.04

# mv guacamole-0.8.3.war /var/lib/tomcat6/webapps/
# ./configure && make -j8 && make install
# guacd 
guacd: error while loading shared libraries: libguac.so.5: cannot open shared object file: No such file or directory
# cp ./src/libguac/.libs/libguac.so.5.0.0 /usr/lib/libguac.so
# guacd 
guacd[11581]: INFO:  Guacamole proxy daemon (guacd) version 0.8.3
guacd[11581]: INFO:  Successfully bound socket to host ::1, port 4822
guacd[11581]: INFO:  Exiting and passing control to PID 11582
  • create a folder /etc/guacamole
mkdir /etc/guacamole
  • create a file /etc/guacamole/guacamole.properties with the content
# Hostname and port of guacamole proxy
guacd-hostname: localhost
guacd-port:     4822

# Location to read extra .jar's from
lib-directory:  /var/lib/tomcat6/webapps/guacamole-0.8.3/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
  • create a file /etc/guacamole/user-mapping.xml with the content
<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>
  • find out your tomcat's user directory:
# cat /etc/passwd|grep tomcat
tomcat6:x:113:116::/usr/share/tomcat6:/bin/false
in this case it is /usr/share/tomcat6
  • create a folder .guacamole in your tomcat's user directory:
mkdir /usr/share/tomcat6/.guacamole
  • link guacamole.properties into your tomcat's user directories' guacamole folder
ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat6/.guacamole
  • now the problem is that tomcat does not know where to find the Authentication class:

/var/lib/tomcat6/webapps/guacamole/WEB-INF/classes/net/sourceforge/guacamole/net/basic/BasicFileAuthenticationProvider.class

is not in /etc/guacamole/guacamole.properties

  • so add it
  • cat /etc/passwd gives me a line
tomcat6:x:113:116::/usr/share/tomcat6:/bin/false
ll /usr/share/tomcat6/.guacamole/
total 8
drwxr-xr-x 2 root root 4096 Nov 26 07:58 ./
drwxr-xr-x 6 root root 4096 Nov 26 07:57 ../
lrwxrwxrwx 1 root root   35 Nov 26 07:58 guacamole.properties -> /etc/guacamole/guacamole.properties
  • works now. So the thing is:
    • take care that it is called guacamole and not guacamole-0.8.3 (sure?)
    • make sure the classpath in /etc/guacamole/guacamole.properties is correct, e.g.
# Location to read extra .jar's from
lib-directory:  /var/lib/tomcat6/webapps/guacamole/WEB-INF/classes
    • make sure you have user-mappings.xml
    • log in as the user given in user-mappings.xml

See also