Hardware installation procedure

11/02/2005


Status




Last updated on 04/10/2017 00:22 by Matthieu Guenebaud
Install aptitude

Type:

sudo apt-get install aptitude
Improve unity

Activate the display of hidden and backup files in nautilus settings, then type:

sudo aptitude install nautilus-image-converter nautilus-open-terminal nautilus-image-manipulator

Add shortcuts :

cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applications/nautilus-home.desktop
gedit ~/.local/share/applications/nautilus-home.desktop

Paste the following code:


X-Ayatana-Desktop-Shortcuts=Téléchargements;Projets;Documents;Images;Musique;Vidéos

[Téléchargements Shortcut Group]
Name=Téléchargements
Exec=nautilus /data/Téléchargements
TargetEnvironment=Unity

[Projets Shortcut Group]
Name=Projets
Exec=nautilus /data/Projets
TargetEnvironment=Unity

[Documents Shortcut Group]
Name=Documents
Exec=nautilus /data/Documents
TargetEnvironment=Unity

[Images Shortcut Group]
Name=Images
Exec=nautilus /data/Images
TargetEnvironment=Unity

[Musique Shortcut Group]
Name=Musique
Exec=nautilus /data/Musique
TargetEnvironment=Unity

[Vidéos Shortcut Group]
Name=Vidéos
Exec=nautilus /data/Vidéos
TargetEnvironment=Unity

Relaunch unity with ALT+F2 and the command

unity --replace

To disable folder indexation, install:

sudo add-apt-repository ppa:zeitgeist/ppa
sudo aptitude update
sudo aptitude install activity-log-manager

And use "activity log manager" application to exclude some folders.

Configure ufw firewall

Install ufw firewall:

sudo aptitude install ufw gufw

Add Netbios support:

sudo vi /etc/default/ufw

Paste the following content at the end of the file:

# The nf_contrack_netbios_ns has been added
IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_netbios_ns"

Activate netbios support:

sudo vi /etc/default/ufw

By adding:

# The nf_contrack_netbios_ns has been added
IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_netbios_ns"

Then apply the following rules:

Generic rules:

sudo ufw default deny incoming
sudo ufw default allow outgoing

Domain:

sudo ufw allow domain

Internet:

sudo ufw allow ssh
sudo ufw allow ftp
sudo ufw allow www
sudo ufw allow https
sudo ufw allow http-alt

Emails:

sudo ufw allow imaps
sudo ufw allow ssmtp
sudo ufw allow xmpp-client

Remote desktop:

sudo ufw allow 5900

Samba:

sudo ufw allow 113
sudo ufw allow proto tcp from 192.168.0.0/24 to 192.168.0.0/24 port 135
sudo ufw allow proto tcp from 192.168.0.0/24 to 192.168.0.0/24 port 139
sudo ufw allow proto tcp from 192.168.0.0/24 to 192.168.0.0/24 port 445
sudo ufw allow proto udp from 192.168.0.0/24 to 192.168.0.0/24 port 137
sudo ufw allow proto udp from 192.168.0.0/24 to 192.168.0.0/24 port 138

Transmission:

sudo ufw allow 9091
sudo ufw allow 9099
sudo ufw allow 20500:20599/tcp
sudo ufw allow 20500:20599/udp

NTP:

sudo ufw allow ntp

FreeTV:

sudo ufw allow proto udp from 212.27.38.253

Before applying the new rules, the logging can be activated with:

sudo ufw logging on

Then reload the configuration with:

sudo ufw enable

The firewall status is visible with:

sudo ufw status

To stop the firewall, the command is:

sudo ufw disable

All the existing rules can be removed with:

sudo ufw reset

And finally, to display the log, type:

sudo tail -f /var/log/ufw.log
VNC client

Install:

sudo aptitude install xtightvncviewer

Then access a remote desktop with:

xtightvncviewer -compresslevel 9 -quality 4 -depth 8 192.168.0.xxx

To create a shortcut in Nautilus, type:

gedit ~/.local/share/applications/nautilus-home.desktop

And add to the shortcut list:

X-Ayatana-Desktop-Shortcuts=Téléchargements;Projets;Documents;Images;Musique;Vidéos;EeeMat

Paste at the end of the file the following content:

[EeeMat Shortcut Group]
Name=Accès distant à EeeMat
Exec=xtightvncviewer -compresslevel 9 -quality 4 -depth 8 192.168.0.13
TargetEnvironment=Unity
Change boot timer

Install Startup Manager:

sudo aptitude install startupmanager

And change the boot timer.

Mount network drives

First create the destination folders:

sudo mkdir /nas
sudo mkdir /nas/Documents
sudo mkdir /nas/Livres
sudo mkdir /nas/Musique
sudo mkdir /nas/Photos
sudo mkdir /nas/Projets
sudo mkdir /nas/Sauvegardes
sudo mkdir /nas/Video
sudo mkdir /nas/Tmp
sudo mkdir /nas/Download

With the proper rights:

sudo chown -R guenmat /nas

Change current user rights:

sudo visudo

By adding the following lines:

%admin ALL=(ALL)NOPASSWD:/bin/mount,/bin/umount

Create a script to mount the NAS drives manually:

vi ~/mountnas.sh

And copy this content (replace LOGIN with the NAS user login and PASSWORD with its password):

#!/bin/bash
# Add Buffalo NAS HDD mount
sudo mount -t cifs //192.168.0.12/Documents /nas/Documents -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Livres /nas/Livres -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Musique /nas/Musique -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Photos /nas/Photos -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Projets /nas/Projets -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Sauvegardes /nas/Sauvegardes -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Video /nas/Video -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Tmp /nas/Tmp -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.12/Download /nas/Download -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777

Change script file execution rights:

chmod +x ~/mountnas.sh

Create a link:

sudo ln -s ~/mountnas.sh /bin/mountnas

Create a script to umount the NAS drives manually:

vi ~/umountnas.sh

And paste the content:

#!/bin/bash
sudo umount -t cifs /nas/Documents
sudo umount -t cifs /nas/Livres
sudo umount -t cifs /nas/Musique
sudo umount -t cifs /nas/Photos
sudo umount -t cifs /nas/Projets
sudo umount -t cifs /nas/Sauvegardes
sudo umount -t cifs /nas/Video
sudo umount -t cifs /nas/Tmp
sudo umount -t cifs /nas/Download

Change script file execution rights:

chmod +x ~/umountnas.sh

Create a link:

sudo ln -s ~/umountnas.sh /bin/umountnas

Create a shortcut for Nautilus:

gedit ~/.local/share/applications/nautilus-home.desktop

Add to the existing shortcuts:

X-Ayatana-Desktop-Shortcuts=Téléchargements;Projets;Documents;Images;Musique;Vidéos;EeeMat;NasUp;NasDown

Paste at the end of the file

[NasUp Shortcut Group]
Name=Monter le NAS
Exec=mountnas
TargetEnvironment=Unity

[NasDown Shortcut Group]
Name=Démonter le NAS
Exec=umountnas
TargetEnvironment=Unity
Google Chrome

Download the latest google chrome at:

Then type:

sudo dpkg -i google-chrome-stable_current_*.deb
Install softwares

• Cheese

• Gimp and plugins

• VLC

• MPlayer

• Filezilla

• Gstreamer and greffons

• Calibre

• Comix

• Truecrypt

Install additionnal pictures editor

Type:

sudo add-apt-repository ppa:atareao/atareao
sudo aptitude install gimp-data-extras gimp-plugin-registry pinta picapy
Install Ubuntu tweak

Type:

sudo add-apt-repository ppa:tualatrix/next
sudo aptitude update
sudo aptitude install ubuntu-tweak
Integrate gmail notifications to gnome

Type:

sudo add-apt-repository ppa:gm-notify-maintainers/ppa
sudo aptitude update
sudo aptitude install gm-notify
Install freebox remote

Install:

sudo add-apt-repository ppa:cavenel/ppa
sudo aptitude update
sudo aptitude install greemote
Upgrade softwares

Type:

sudo add-apt-repository ppa:transmissionbt/ppa
sudo add-apt-repository ppa:banshee-team/ppa
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo aptitude update
sudo aptitude install subtitleeditor

Do not forget to add blocking rules from the site:

http://www.iblocklist.com/lists.php

More precisely for France, apply:

http://list.iblocklist.com/?list=fr&fileformat=p2p&archiveformat=gz
Puddletag (mp3 tag)

Type:

sudo aptitude install python-qt4 python-pyparsing python-mutagen python-configobj python-musicbrainz2 pacpl mp3gain lame eyed3

Then download the latest version at:

And type:

tar xzvf puddletag-0.10.6.3.tar.gz
sudo mv puddletag-0.10.6.3 /opt

Create a new shortcut:

gedit ~/.local/share/applications/puddletag.desktop

Paste the content:

[Desktop Entry]
Name=Puddletag
Comment=Audio Tag Editor
Exec=/opt/puddletag-0.10.6.3/puddletag
Icon=/opt/puddletag-0.10.6.3/puddletag.png
Terminal=false
StartupNotify=true
Type=Application
OnlyShowIn=GNOME;Unity;
Categories=GNOME;GTK;AudioVideo;

Launch the application.

Install the plugins:

tar xzvf extended-1.2.tar.gz
tar xzvf id3_tools-1.0.tar.gz
sudo mv extended ~/.puddletag/plugins
sudo mv id3_tools ~/.puddletag/plugins

They need to be activated within the application at:

Edit -> Preferences -> Plugins.
Install OVH Mom

Download the latest version on the OVH site.

Then type:

tar xzvf MoM*.tar.gz
sudo mv MoM /opt

And create a shortcut:

gedit ~/.local/share/applications/mom.desktop

Paste:

[Desktop Entry]
Name=OVH MoM
Comment=OVH MoM
Exec=/opt/MoM/MoM
Icon=ibus-engine
Terminal=false
StartupNotify=true
Type=Application
OnlyShowIn=GNOME;Unity;
Categories=GNOME;GTK;Internet;
Install Conky

Type:

sudo aptitude install conky lm-sensors

Then download scripts at:

And type:

tar xzvf conkytheme.tar.gz
mv .conkytheme /home/guenmat

To try manually the configuration, type:

conky -c /home/guenmat/.conkytheme/conkyrc-big-dell2

In order to start conky automatically on startup, create a new script with:

vi ~/conkystartup.sh

And paste the following content:

#!/bin/bash
sleep 15&&
conky -c /home/guenmat/.conkytheme/conkyrc-big-dell2

Change the script execution rights:

sudo chmod +x ~/conkystartup.sh

Then use the ubuntu "Startupt applications" tool to create a new entry calling the previous script.

Thunderbird

Install plugins:

• adblock

• lightning

• google calendar provider

• google contacts

Download the 64bits version of plugins at:

Disable startup sound

Edit the file:

gksudo gedit /usr/share/gnome/autostart/libcanberra-login-sound.desktop

Replace the line:

NoDisplay=true

With:

NoDisplay=false

Then disable "Gnome login sound" on startup.

Install Virtualbox 4.0.x

Type:

sudo wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo echo "deb http://download.virtualbox.org/virtualbox/debian `lsb_release -sc` contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.list
sudo apt-get update
sudo aptitude install virtualbox-4.3

Do not forget to install the extension pack from within virtualbox.

Java JRE & JDK

Type:

sudo aptitude install openjdk-6-jdk openjdk-6-jre

Then define the JAVA_HOME variable by editing:

sudo vi ~/.bashrc

Add the following lines at the end of the file:

JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64"
export JAVA_HOME

Then reload the configuration:

source ~/.bashrc
Maven 3

Download the latest version at:

It should be "apache-maven-*.tar.gz". Uncompresse the file with:

tar xzvf apache-maven-*.tar.gz
mv apache-maven-* /data/Applications
sudo ln -s /data/Applications/apache-maven-3.1.1/bin/mvn /usr/bin/mvn

Then check the installation with:

which mvn
mvn -version

To configure maven, edit the file at:

/data/Applications/apache-maven-3.1.1/conf

In order to deploy artifacts with maven, install:

sudo aptitude install putty putty-tools
Mysql

Type:

sudo aptitude install mysql-server

Check the installation with the following command, the status must be "started"

sudo service mysql status

Then configure the database with:

sudo vi /etc/mysql/my.cnf

And add these two lines at the end of the file:

character-set-server=utf8
skip-character-set-client-handshake

Reboot the database:

sudo service mysql restart

The connect to the server and create the databases:

mysql -u root -p
CREATE DATABASE XXXXX

Et donner les droits à un utilisateur :

grant all on XXXXX.* to 'login'@'localhost' identified by 'password';

In my case:

mysql -u root -p
CREATE DATABASE guenmat;
grant all on guenmat.* to 'login'@'localhost' identified by 'password';
CREATE DATABASE notepad;
grant all on notepad.* to 'login'@'localhost' identified by 'password';
CREATE DATABASE notepadcore;
grant all on notepadcore.* to 'login'@'localhost' identified by 'password';
CREATE DATABASE mediacollection;
grant all on mediacollection.* to 'login'@'localhost' identified by 'password';
CREATE DATABASE mediacollectioncore;
grant all on mediacollectioncore.* to 'login'@'localhost' identified by 'password';
CREATE DATABASE weightmanager;
grant all on weightmanager.* to 'login'@'localhost' identified by 'password';
CREATE DATABASE weightmanagercore;
grant all on weightmanagercore.* to 'login'@'localhost' identified by 'password';
Eclipse

Download the latest version at:

Then type:

tar xzvf eclipse*.tar.gz
mv eclipse /data/Applications
sudo ln -s /data/Applications/eclipse/eclipse /usr/bin/eclipse

Create a shortcut:

gedit ~/.local/share/applications/eclipse.desktop

Paste this content:

[Desktop Entry]
Name=Eclipse
Comment=Environnement de développement JAVA
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
StartupNotify=true
Type=Application
OnlyShowIn=GNOME;Unity;
Categories=GNOME;GTK;Development;

Install plugins:

Subclipse : http://subclipse.tigris.org/update_1.6.x
m2eclipse : http://m2eclipse.sonatype.org/sites/m2e
m2eclipse extras : http://m2eclipse.sonatype.org/sites/m2e-extras
GWT : http://dl.google.com/eclipse/plugin/3.7

On the first startup, eclipse should ask for a default browser. In order to user chrome, add the following settings

Location : /opt/google/chrome/google-chrome
Parameters : -url %URL%
SVN

Type:

sudo aptitude install subversion

To download the source:

cd /data/Projets/workspace
svn checkout --username mguenebaud http://svn.guenmat.com/trunk/

In Eclipse, the "SVNKit (Pure Java)" option must be checked.

Tomcat 7

Download the latest version at:

Then type:

sudo tar zxvf apache-tomcat-*.tar.gz
sudo cp -R apache-tomcat-7.0.22 /usr/share/tomcat7
cd /usr/share/tomcat7/conf
sudo chmod a+rw *

In eclipse, declare this server with :

Windows->Preferences->Server->Runtime Environment and value (/usr/share/tomcat7)
Install android SDK

First, type:

apt-get install ia32-libs

Then download the latest version at:

And type:

sudo tar zxvf android-sdk_r15-linux.tgz
sudo mv android-sdk-linux /data/Projets/android-sdk-linux
sudo chown -R guenmat /data/Projets/android-sdk-linux

Change the current PATH:

vi ~/.bashrc

Add the line:

export PATH=${PATH}:/data/Projets/android-sdk-linux/platform-tools

And reload the configuration:

source ~/.bashrc

To automatically recognise android devices, type:

echo SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" | sudo tee /etc/udev/rules.d/51-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666" | sudo tee /etc/udev/rules.d/52-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666" | sudo tee /etc/udev/rules.d/53-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="04E8", MODE="0666" | sudo tee /etc/udev/rules.d/54-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="0B05", MODE="0666" | sudo tee /etc/udev/rules.d/55-android.rules

Then reload the settings with:

sudo service udev reload

Plug the devices, and type:

adb devices

The connected devices must appear in the list.