Category: Ubuntu

Guacamole: clientless remote desktop – latest version tutorial on Ubuntu/Xubuntu 14.04/16.04

Guacamole website: http://guacamole.incubator.apache.org/

Guacamole user guide: http://guacamole.incubator.apache.org/doc/gug/users-guide.html

 

guacamole-server

Required dependencies:

sudo apt install libcairo2-dev libjpeg-dev libpng12-dev libossp-uuid-dev libavcodec-dev libswscale-dev

Optional dependencies for VNC, RDP, SSH, and Telnet support:

sudo apt install libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev

Required dependency in order to launch the configure script:

sudo apt install libtool

 

Source code

Stable releases download: http://guacamole.incubator.apache.org/releases/

wget http://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-0.9.9.tar.gz
tar -xzf guacamole-server-0.9.9.tar.gz
mv guacamole-server-0.9.9 guacamole-server

or latest Github revision:

git clone https://github.com/apache/incubator-guacamole-server guacamole-server

Enter source folder

cd guacamole-server

Only for Github source: files downloaded directly from git will not contain the configure script, as autogenerated code is not included in the project’s repositories. So we need an extra package to be installed:

sudo apt install autoconf libtool

and generate configure manually:

autoreconf -fi

 

Build and install

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

The --with-init-dir=/etc/init.d shown above prepares the build to install a startup script for guacd into the /etc/init.d directory, such that we can later easily configure guacd to start automatically on boot.

make
sudo make install
sudo ldconfig
cd ..

 

guacamole-client

Required dependencies: we need the Tomcat servlet container, website: http://tomcat.apache.org/

sudo apt install tomcat7

To compile we need Maven and the Java SDK (called JDK) because the Java JRE (jre-default) is not enough:

sudo apt-get install maven default-jdk

 

Source code

Download the stable release

wget http://sourceforge.net/projects/guacamole/files/current/source/guacamole-client-0.9.9.tar.gz
tar -xzf guacamole-client-0.9.9.tar.gz
mv guacamole-client-0.9.9 guacamole-client

or latest revision from Github:

git clone https://github.com/apache/incubator-guacamole-client.git guacamole-client
cd guacamole-client

 

Build and install

Ready to compile the java package:

mvn package

Move and rename the webapp to simplify the resulting URL

sudo cp guacamole/target/guacamole-0.9.10-incubating.war /var/lib/tomcat7/webapps/guacamole.war
cd ..

 

Configure

Create the configuration folder

sudo mkdir /etc/guacamole

Link our configuration folder to guacamole’s default location

sudo ln -s /etc/guacamole /usr/share/tomcat7/.guacamole


Create the properties file

sudo mousepad /etc/guacamole/guacamole.properties

and edit as follow:

# Hostname and port of guacamole proxy
guacd-hostname: localhost
guacd-port: 4822

# Location to read extra .jar's from
lib-directory: /var/lib/tomcat7/webapps/guacamole/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 the client’s list

sudo mousepad /etc/guacamole/user-mapping.xml

edit as u need, the reference is here:
href=”http://guacamole.incubator.apache.org/doc/gug/configuring-guacamole.html

Example: (authorize username and password can be left empty for anonymous login)

<user-mapping> 
    <authorize username="admin" password="admin">
        <!-- RDP - Remotedesktop -->
        <!-- Parameters explained here: http://guac-dev.org/doc/gug/configuring-guacamole.html#rdp -->

        <connection name="Redmond OS7 RDP (simple login)">
                <protocol>rdp</protocol>
                <param name="hostname">192.168.0.10</param>      <!-- FQDN or host IP -->
                <param name="port">2389</param>                   <!-- Port, Standard is 3389 -->
                <param name="disable-audio">true</param>          <!-- disable audio -->
        </connection>

        <connection name="Redmond OS7 RDP (extended login)">
                <protocol>rdp</protocol>
                <param name="hostname">192.168.2.112</param>      <!-- FQDN or host IP -->
                <param name="port">3389</param>                   <!-- Port, Standard is 3389 -->
                <param name="username">cesare</param>       <!-- Login -->
                <param name="password">cesare</param>        <!-- Password -->
        <param name="domain">mydomain.local</param>              <!-- Domain -->
                <param name="disable-audio">true</param>          <!-- disable audio -->
                <param name="server-layout">it-it-qwerty</param>  <!-- IT keyboard layout -->
        </connection>
 
        <connection name="Linux Mint 18 VM">
                <protocol>rdp</protocol>
                <param name="hostname">192.168.0.100</param>      <!-- FQDN or host IP -->
                <param name="port">3389</param>                   <!-- Port, Standard is 3389 -->
                <param name="disable-audio">true</param>          <!-- disable audio -->
        </connection>

        <!-- WebSSH -->
        <!-- Parameters explained here: http://guac-dev.org/doc/gug/configuring-guacamole.html#ssh -->
        <connection name="SSH Server #1">
                <protocol>ssh</protocol>
                <param name="hostname">192.168.0.100</param>      <!-- FQDN or host IP -->
                <param name="port">22</param>                     <!-- Port, standard is 22 -->
                <param name="username">myname</param>             <!-- login -->
                <param name="password">mypassword</param>        <!-- password -->
                <param name="color-scheme">green-black</param>        <!-- set the color scheme -->
                <param name="font-name">Ubuntu Mono</param>        <!-- set the font family -->

        </connection>
    </authorize>
</user-mapping>

 

Services start

14.04 releases

sudo service tomcat7 restart
sudo service guacd start

16.04 releases

sudo systemctl restart tomcat7
sudo systemctl start guacd

 

Connect to Guacamole

Browse to:

http://<server-ip>:8080/guacamole

 

Enable Guacamole to run at startup

14.04 releases

sudo update-rc.d tomcat7 defaults
sudo update-rc.d guacd defaults

16.04 releases

sudo systemctl enable tomcat7
sudo systemctl enable guacd


TODO:
http://stackoverflow.com/questions/14325171/setting-default-application-in-tomcat-7

How to install .ttf fonts in Xubuntu

Fonts only for your user

mkdir ~/.fonts
cp <myfont.ttf> ~./fonts/

Or system wide fonts

cp <myfont.ttf> /usr/share/fonts/truetype/

Then reload the fonts cache

sudo fc-cache -f

Anjuta: an alternative IDE for pyGI

This tutorial will show you how to compile Anjuta from the source, this is necessary because the latest version available on repository is not always updated. The following steps are tested on Xubuntu 14.04.

 

Install dependencies
sudo apt-get git install flex bison g++ libglib2.0-dev libgtk-3-dev libxml2-dev libgdl-3-dev libgda-5.0-dev libgtksourceview-3.0-dev intltool itstool libxml2-utils

If you want to build also the documentation:

sudo apt-get install yelp-tool gtk-doc-tools

 

Plugins dependencies

if you need the Glade plugin:

sudo apt-get install libgladeui-dev

if you need the DevHelp plugin:

sudo apt-get install libdevhelp-dev

if you need the terminal plugin:

sudo apt-get install libvte-2.90-dev

if you need the python plugin:

sudo apt-get install python-dev python-rope

if you need the subversion plugin:

sudo apt-get install libsvn-dev

if you need the vala plugin:

sudo apt-get install libvala-0.22-dev valac

 

Get source from repository
git clone https://github.com/GNOME/anjuta.git anjuta-git
cd anjuta-git

 

 Configure and compile
./autogen.sh

if you have installed all packages needed by each plugin, you should get:

-------------------------------------------------------------------
 Conditionally built plugins:
 -------------------------------------------------------------------
 Building subversion plugin: ............................YES
 Building glade plugin: .................................YES
 Building devhelp plugin: ...............................YES
 Building terminal plugin: ..............................YES
 Building Vala support: .................................YES
 Building python plugin loaeder: ........................YES
 -------------------------------------------------------------------

then

make -j4
sudo make install

The executable file will be placed in /usr/local/bin/anjuta but if you lauch Anjuta from command line you will encounter this error:

$ anjuta
anjuta: error while loading shared libraries: libanjuta-3.so.0: cannot open shared object file: No such file or directory

In fact if we check the loaded libraries we will find out that the problem concerns libanjuta-3.so.0 (not found) which is not in the path

ldd /usr/local/bin/anjuta
linux-vdso.so.1 =>  (0x00007fff0e9c9000)
libgtksourceview-3.0.so.1 => /usr/lib/x86_64-linux-gnu/libgtksourceview-3.0.so.1 (0x00007f68faff9000)
libgdl-3.so.5 => /usr/lib/x86_64-linux-gnu/libgdl-3.so.5 (0x00007f68fadca000)
...
libanjuta-3.so.0 => not found
...

libanjuta-3.so.0 is located in /usr/local/lib which is not included in the default path:

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Add /usr/local/lib to the path permanently:

sudo touch /etc/profile.d/local_lib.sh

Edit /etc/profile.d/local_lib.sh as follow:

# set PATH so it includes local lib if it exists
if [ -d "/usr/local/lib" ] ; then
    PATH="/usr/local/lib:$PATH"
fi

Update the path:

. /etc/profile.d/local_lib.sh

Finally we can launch Anjuta:

anjuta -v

Anjuta 3.18.2

Xubuntu: how to create a local repository

I had the necessity to create a local repository in order to handle the upgrade of local packages, as if they were from official repositories.
 
Create your own repository folder

sudo su
mkdir /usr/local/packages

 
Create and edit the script file which will upgrade the packages’ list every time we add a new one

touch packages_list_upgrade.sh
cat packages_list_upgrade.sh
 
#!/bin/sh
DIR="."
# open each .deb file and create a zipped list file
CMD="dpkg-scanpackages $DIR | gzip > $DIR/Packages.gz"

eval $CMD
chmod +x packages_list_upgrade.sh

 
Update /etc/apt/source.list with the new location

echo "deb file:/usr/local packages" >> /etc/apt/source.list

 
Copy your packages into the folder and run the script

./packages_list_upgrade.sh

 
Now you can install/remove/manage your local packages using command line or through Synaptic

WordPress Themes