Skip to content

Instantly share code, notes, and snippets.

@varunchopra
Last active October 26, 2018 19:19
Show Gist options
  • Save varunchopra/71ea619431a9d5030969f48802349b29 to your computer and use it in GitHub Desktop.
Save varunchopra/71ea619431a9d5030969f48802349b29 to your computer and use it in GitHub Desktop.

Install required packages:

Required packages for make:

  • build-essential

Required packages for Guacamole:

  • libcairo2-dev
  • libjpeg-turbo8-dev
  • libpng-dev
  • libossp-uuid-dev

Required packages for ffmpeg recording:

  • libavcodec-dev
  • libavutil-dev
  • libswscale-dev

Packages for FreeRDP:

  • libfreerdp-dev

Optional packages:

  • libssl-dev
  • libvorbis-dev
  • libwebp-dev

Packages required for Guacamole client:

  • tomcat8
  • default-jdk

Download Guacamole server:

wget http://mirrors.fibergrid.in/apache/guacamole/0.9.14/source/guacamole-server-0.9.14.tar.gz

Configure for make:

./configure --with-init-dir=/etc/init.d

The output should be something like this: (make sure RDP is available)

------------------------------------------------
guacamole-server version 0.9.14
------------------------------------------------

   Library status:

     freerdp ............. yes
     pango ............... no
     libavcodec .......... yes
     libavutil ........... yes
     libssh2 ............. no
     libssl .............. yes
     libswscale .......... yes
     libtelnet ........... no
     libVNCServer ........ no
     libvorbis ........... yes
     libpulse ............ no
     libwebp ............. yes
     wsock32 ............. no

   Protocol support:

      RDP ....... yes
      SSH ....... no
      Telnet .... no
      VNC ....... no

   Services / tools:

      guacd ...... yes
      guacenc .... yes

   Init scripts: /etc/init.d

Type "make" to compile guacamole-server.

Install guacamole-server:

Compile guacamole-server:

make

and install the components that were just built:

make install

Update system's cache of installed libraries:

ldconfig

Download guacamole-client:

wget http://mirrors.estointernet.in/apache/guacamole/0.9.14/binary/guacamole-0.9.14.war
mv guacamole-0.9.14.war guacamole.war
cp guacamole.war /var/lib/tomcat8/webapps/

Restart tomcat

/etc/init.d/tomcat8 restart

Start guac daemon

/etc/init.d/guacd start
mkdir /etc/guacamole
mkdir /usr/share/tomcat8/.guacamole
nano /etc/guacamole/guacamole.properties

Paste in the following:

guacd-hostname: localhost
guacd-port: 4822
user-mapping: /etc/guacamole/user-mapping.xml
auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider
basic-user-mapping: /etc/guacamole/user-mapping.xml
ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat8/.guacamole/

Get password hash

printf '%s' "tecmint01" | md5sum

Open user mapping

nano /etc/guacamole/user-mapping.xml
<user-mapping>
        <authorize 
                username="tecmint" 
                password="8383339b9c90775ac14693d8e620981f" 
                encoding="md5">
                <connection name="RHEL 7">
                        <protocol>ssh</protocol>
                        <param name="hostname">192.168.0.18</param>
                        <param name="port">22</param>
                        <param name="username">gacanepa</param>
                </connection>
                <connection name="Windows 10">
                        <protocol>rdp</protocol>
                        <param name="hostname">node-01.easyrdp.com</param>
                        <param name="port">3389</param>
                        <param name="username">Administrator</param>
                        <param name="password">kKc;nn*cQR8</param>
                </connection>
        </authorize>
</user-mapping>
chmod 600 /etc/guacamole/user-mapping.xml
chown tomcat8:tomcat8 /etc/guacamole/user-mapping.xml

Start tomcat and guac daemon if not done already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment