Last active
December 17, 2015 10:49
-
-
Save sionc/5597562 to your computer and use it in GitHub Desktop.
Instructions to deploy Guacamole web app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Navigate to Guacamole web app directory | |
$ cd guacamole | |
Build using maven | |
$ mvn package | |
Deploying the application | |
--------------------------- | |
Copy the guacamole app into the tomcat webapps folder | |
$ sudo cp target/guacamole-0.7.1.war /var/lib/tomcat6/webapps/guacamole.war | |
Copy guacamole.properties to a separate folder for deployment purposes | |
$ sudo mkdir /etc/guacamole | |
$ sudo cp doc/example/guacamole.properties /etc/guacamole/guacamole.properties | |
Create a symbolic link for guacamole.properties | |
$ sudo ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat6/lib/ | |
Move user-mapping.xml to a separate folder for deployment purposes | |
$ sudo cp doc/example/user-mapping.xml /etc/guacamole/user-mapping.xml | |
Edit guacamole.properties file to include the correct path of the user-mapping file | |
$ sudo gedit guacamole.properties | |
Modify the last line | |
basic-user-mapping: /etc/guacamole/user-mapping.xml | |
Edit user-mapping.xml | |
$ sudo gedit user-mapping.xml | |
Based on the example, fill in the information for users authorized to access the desktop | |
Make sure vncserver is installed | |
$ sudo apt-get install vnc4server | |
We need to fix the cursor. So, start the vncserver | |
$ vncserver | |
and then kill it. This generates the xstartup file | |
$ vncserver -kill :1 | |
Then edit the xstartup file | |
$ gedit ~/.vnc/xstartup | |
and it should like this: | |
##################################################################### | |
#!/bin/sh | |
# Uncomment the following two lines for normal desktop: | |
# unset SESSION_MANAGER | |
# exec /etc/X11/xinit/xinitrc | |
#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
#xsetroot -solid grey | |
#vncconfig -iconic & | |
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & | |
#x-window-manager & | |
# VNC Server (Virtual-Mode) start-up script compatible with Ubuntu 12.04 | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
xsetroot -solid grey | |
vncconfig -iconic & | |
if [ -f /usr/bin/gnome-session ]; then | |
# Some gnome session types won't work with Xvnc, try to pick a sensible | |
# default. | |
for SESSION in "ubuntu-2d" "2d-gnome"; do | |
if [ -f /usr/share/gnome-session/sessions/$SESSION.session ]; then | |
DESKTOP_SESSION=$SESSION; export DESKTOP_SESSION | |
GDMSESSION=$SESSION; export GDMSESSION | |
xmodmap -e "keycode 23 = Tab ISO_Left_Tab" | |
xmodmap -e "keycode 79 = KP_Home KP_7 F27 KP_7 F27" | |
xmodmap -e "keycode 80 = KP_Up KP_8 F28 KP_8 F28" | |
xmodmap -e "keycode 81 = KP_Prior KP_9 F29 KP_9 F29" | |
xmodmap -e "keycode 83 = KP_Left KP_4 F30 KP_4 F30" | |
xmodmap -e "keycode 84 = KP_Begin KP_5 F31 KP_5 F31" | |
xmodmap -e "keycode 85 = KP_Right KP_6 F32 KP_6 F32" | |
xmodmap -e "keycode 87 = KP_End KP_1 F33 KP_1 F33" | |
xmodmap -e "keycode 88 = KP_Down KP_2 F34 KP_2 F34" | |
xmodmap -e "keycode 89 = KP_Next KP_3 F35 KP_3 F35" | |
xmodmap -pke | |
STARTUP="/usr/bin/gnome-session --session=$SESSION"; export STARTUP | |
fi | |
done | |
fi | |
if [ -x /etc/X11/Xsession ]; then /etc/X11/Xsession | |
elif [ -x /etc/X11/xdm/Xsession ]; then /etc/X11/xdm/Xsession | |
elif [ -x /etc/X11/xinit/Xsession ]; then /etc/X11/xinit/Xsession | |
elif [ -x /etc/gdm/Xsession ]; then /etc/gdm/Xsession gnome-session | |
elif [ -x /etc/kde/kdm/Xsession ]; then /etc/kde/kdm/Xsession | |
elif [ -x /usr/dt/bin/Xsession ]; then | |
XSTATION=1 DTXSERVERLOCATION=local /usr/dt/bin/Xsession | |
elif [ -x /usr/dt/bin/dtsession ]; then /usr/dt/bin/dtsession | |
else | |
if which twm > /dev/null 2>&1; then | |
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & | |
twm | |
else | |
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" | |
fi | |
fi | |
vncserver -kill $DISPLAY | |
#################################################################### | |
(Click here for full article) | |
Then save the file and restart vncserver | |
$ vncserver | |
Go to ‘Desktop Sharing Preferences’ on Ubuntu and check the option for | |
Allow other users to view your desktop | |
Start tomcat | |
$ sudo service tomcat6 restart | |
Start guacd | |
$ sudo service guacd start | |
Go to the following address from another system to test | |
http://[Remote system IP here]:8080/guacamole | |
Fill in the authentication information | |
To view the process bound to a particular port | |
$ sudo lsof -i :[port number] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment