Guacamole

Guacamole is an HTML5 web application that provides access to your desktop using remote desktop protocols. A centralized server acts as a tunnel and proxy, allowing access to multiple desktops through a web browser; no plugins needed. The client requires nothing more than a web browser supporting HTML5 and AJAX.

安裝步驟

2014-09

  1. Install packages
  2. $ sudo aptitude install guacamole-tomcat
    $ sudo aptitude install libguac-client-ssh0 libguac-client-rdp0
    $ cd /etc/guacamole
    $ sudo cp user-mapping.xml user-mapping.xml.orig
    

  3. Edit user-mapping.xml
  4. user-mapping.xml

    <user-mapping>
    	
        <!-- User with one connection only -->
        <authorize username="USERNAME" password="PASSWORD">
            <protocol>vnc</protocol>
            <param name="hostname">localhost</param>
            <param name="port">5900</param>
            <param name="password">VNCPASS</param>
        </authorize>
        <!-- Another user, but using md5 to hash the password
             (example below uses the md5 hash of "PASSWORD"),
             and providing two connections -->
        <authorize 
                username="USERNAME2"
                password="319f4d26e3c536b5dd871bb2c52e3178"
                encoding="md5">
                    <connection name="VNC Desktop 1">
                        <protocol>vnc</protocol>
                        <param name="hostname">localhost</param>
                        <param name="port">5901</param>
                        <param name="password">VNCPASS</param>
                    </connection>
                    <connection name="VNC Desktop 2">
                        <protocol>vnc</protocol>
                        <param name="hostname">localhost</param>
                        <param name="port">5902</param>
                        <param name="password">VNCPASS</param>
                    </connection>
    	<connection name="RDP Desktop">
    	  <protocol>rdp</protocol>
    	  <param name="hostname">localhost</param>
    	  <param name="port">3389</param>
    	  <param name="domain"></param>
    	  <param name="username"></param>
    	  <param name="password"></param>
    	  <!-- <param name="initial-program">explorer.exe</param> -->
    	  <param name="color-depth">32</param><!-- 8,16,24 or 32 -->
    	  <param name="width">1024</param>
    	  <param name="height">768</param>
    	</connection>
            <connection name="Unique Name">
              <protocol>ssh</protocol>
              <param name="hostname">localhost</param>
              <param name="port">22</param>
            </connection>
        </authorize>
    </user-mapping>
    

  5. Generate md5 hash value
  6. echo -n 'PASSWORD' | md5sum

  7. Restart Guacamole daemon
  8. sudo service guacd restart

  9. Install VNC Server on Guacamole client
  10. sudo aptitude install vnc4server

  11. Launch VM with vnc password
  12. kvm image -vnc ${dpy},password -monitor stdio
    (qemu) set_password vnc password

    guacamole.properties

    #    Guacamole - Clientless Remote Desktop
    #    Copyright (C) 2010  Michael Jumper
    #
    #    This program is free software: you can redistribute it and/or modify
    #    it under the terms of the GNU Affero General Public License as published by
    #    the Free Software Foundation, either version 3 of the License, or
    #    (at your option) any later version.
    #
    #    This program is distributed in the hope that it will be useful,
    #    but WITHOUT ANY WARRANTY; without even the implied warranty of
    #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #    GNU Affero General Public License for more details.
    #
    #    You should have received a copy of the GNU Affero General Public License
    #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    # Hostname and port of guacamole proxy
    guacd-hostname: localhost
    guacd-port:     4822
    # Auth provider class (authenticates user/pass combination, needed if using the provided login screen)
    auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider
    basic-user-mapping: /etc/guacamole/user-mapping.xml
    

Old

  1. 安裝 x11vnc.
  2. sudo aptitude install x11vnc
    mkdir ~/.x11vnc
    x11vnc -storepasswd password ~/.x11vnc/passwd
    x11vnc -display :0 -forever -rfbauth ~/.x11vnc/passwd&
    

  3. 安裝 Tomcat.
  4. sudo apt-get install openjdk-6-jdk openjdk-6-jre openjdk-6-jre-lib
    sudo apt-get install tomcat6
    

  5. 安裝 VNC third-party library, libvncclient.
  6. sudo apt-get install libvncserver0
    

  7. 下載安裝 Guacamole.
  8. OS Version32-bit64-bit
    Debian 6.0 Download Download
    Ubuntu 10.04 Download Download
    Ubuntu 10.10 Download Download
    Ubuntu 11.04 Download Download
    Fedora 14 Download Download
    Fedora 15 Download Download
    tar zxvf guacamole-0.4.0-*.tar.gz
    cd guacamole-0.4.0-*
    sudo dpkg -i *.deb
    

  9. Configuration
  10. Test the install
  11. http://localhost:8080/guacamole/

References

  1. Guacamole
  2. Guacamole HTML5 Clientless Remote Desktop