13/10/2010


Status




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

Type:

sudo apt-get install aptitude
NVidia Optimus

The NVidia Graphic card is properly detected by the main board.

The drivers must only be activated. To do so, remove the current configuration file:

sudo rm /etc/X11/xorg.conf

The remove the current drivers

sudo apt-get remove nvidia-current

Relaunch X server

startx
Activate touchpad

Type:

sudo aptitude install dconf-tools

Then launch "dconf Editor", and go to:

org > gnome > settings-daemon > peripherals > touchpad

And make sure the option "touchpad-enabled" is ticked.

It is also possible to disable the touchpad while using the keyboard with the option "disable-while-typing".

Standbye and hibernation

The USB 3.0 controller is not properly managed and is blocking standbye and hibernation.

First, the list of xhdi_hcd modules is availalble with the command:

ls /sys/bus/pci/drivers/xhci_hcd/ | grep "[0-9a-zA-Z]\{4\}:[0-9a-zA-Z]\{2\}:[0-9a-zA-Z]\{2\}.[0-9a-zA-Z]"

The results should be a list of components such as XXXX:XX:XX.X. Keep track of this information.

Then, a new script is needed to disable those components from xhdi_hcd module on standbye:

gksudo gedit /etc/pm/sleep.d/20_custom-xhci_hcd

Paste this content:

#!/bin/sh
# Fichier : "/etc/pm/sleep.d/20_custom-xhci_hcd".
case "${1}" in
hibernate|suspend)
# Libérer le module xhci_hcd du premier périphérique XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
# Libérer le module xhci_hcd du second périphérique XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
;;
resume|thaw)
# Lier le module xhci_hcd au premier périphérique XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/xhci_hcd/bind
# Lier le module xhci_hcd au second périphérique XXXX:XX:XX.X:
echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/xhci_hcd/bind
;;
esac

Replace all XXXX:XX:XX.X by the previous values.

Then we need to do the same with hibernation:

gksudo gedit /etc/pm/config.d/usb3-suspend-workaround

Paste the following:

#Fichier : "/etc/pm/config.d/usb3-suspend-workaround".
SUSPEND_MODULES="xhci"

Change the script execution rights:

sudo chmod +x /etc/pm/sleep.d/20_custom-xhci_hcd
Handle mouse buttons

Install btnx :

sudo aptitude install btnx btnx-config

Then type as root:

sudo btnx-config

And configure the mouse button using the GUI.

Improve unity

Type:

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

Then add the following shortcuts:

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

Paste the following:


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 typing:

unity --replace

To remove the system files indexation:

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

And configurate the "activity log manager" to exclude all unnecessary folders.

Configure ufw firewall

Install ufw firewall:

sudo aptitude install ufw gufw

Activate netbios support with:

sudo vi /etc/default/ufw

Add the following lines:

# 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

Printer sharing:

sudo ufw allow 631

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 a new client:

sudo aptitude install xtightvncviewer

Then use the following line to access remotely to a computer:

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

A shortcut can be created in Nautilus:

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

Then add to the existing shorcuts:

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

And define the commands:

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

Relaunch unity with ALT+F2 and typing:

unity --replace

Change boot timer

Install Startup Manager:

sudo aptitude install startupmanager

Then 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

Give administrator privileges to the curret user:

sudo visudo

Add the following line at the end of the file:

%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

Finally create a launcher for unity:

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

Change the shortcuts list:

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

And paste the following:

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

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

Relaunch unity with ALT+F2 and typing:

unity --replace

Google Chrome

Download the latest google chrome at:

Then type:

sudo aptitude install libnspr4-0d libcurl3 libxss1
sudo dpkg -i google-chrome-stable_current_*.deb
Liste non exhaustives de logiciels à installer

• Cheese

• Gimp and plugins

• VLC

• MPlayer

• Filezilla

• Greffons gstreamer music and video

• Calibre

• Comix

• Truecrypt

Install pictures edition softwares

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
Add gmail notifications to gnome

Type:

sudo add-apt-repository ppa:gm-notify-maintainers/ppa
sudo aptitude update
sudo aptitude install gm-notify
Install a Freebox revolution remote controller

Type:

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

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 to transmission 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 tags)

First install:

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

Then download the package at:

Type:

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

Then create a shortcut:

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

Paste the following 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;

Start the application.

Finally 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 from the software at

Edit -> Preferences -> Plugins.
Install OVH Mom

Download the archive on the OVH site.

Then:

tar xzvf MoM*.tar.gz
sudo mv MoM /opt
gedit ~/.local/share/applications/mom.desktop

And paste the following content:

[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;
Installer Conky

Type:

sudo aptitude install conky lm-sensors

Then download scripts at:

And type:

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

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 the followng plugins:

• adblock

• lightning

• google calendar provider

• google contacts ...

For 64bits plugins, download them at

Disable start sound

Edit the file:

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

And change the line

NoDisplay=true

By

NoDisplay=false

Then launch the list of applications starting with ubuntu and disable "Gnome login sound".

Startup applications

By default, ubuntu hide all startup applications in tool "Startup applications". To display them all, type:

cd /etc/xdg/autostart/
sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop

In order to hide them again, type:

cd /etc/xdg/autostart/
sudo sed --in-place 's/NoDisplay=false/NoDisplay=true/g' *.desktop
Creative Zen 32Go

Install mtpfs

sudo aptitude install mtpfs
sudo mkdir /media/creative
sudo chmod 777 -R /media/creative

Mount the device:

mtpfs /media/creative

Umount the device:

fusermount -u /media/creative
Installer Virtualbox 4.0.x

Type:

sudo -v
echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee -a /etc/apt/sources.list
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo aptitude update
sudo aptitude install virtualbox-4.1

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
Maven3

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
sudo mv eclipse /opt
sudo ln -s /opt/eclipse/eclipse /usr/bin/eclipse

Create a shortcut:

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

Paste the following:

[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;

The eclipse plugins to install manually are:

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

Then download the sources:

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/* /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)
Installer le SDK android

Type:

apt-get install ia32-libs

Download the latest version at:

Then type:

sudo tar zxvf android-sdk_r13-linux_x86.tgz
sudo mv android-sdk-linux_x86 /data/Projets/android-sdk-linux_x86
sudo chown -R guenmat /data/Projets/android-sdk-linux_x86
android

The ANDROID_HOME variable can be set with:

sudo vi ~/.bashrc

Add the following lines at the end of the file:

export PATH=${PATH}:/data/Projets/android-sdk-linux_x86/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.

Kernel 3.0.0-13 startup issue

Following the kernel 3.0.0-13 instalaltion, the laptop does not start (caps lock are blinking but nothing happens).

The previous kernel must be used to start. Find the previous kernels in command line:

sudo dpkg --get-selections | grep linux-image

Then remove the kernel which is crashing:

sudo apt-get purge linux-image-3.0.0-13-generic
sudo apt-get --purge remove linux-headers-3.0.0-13-generic

Reboot.

Reinstall the kernel

sudo aptitude install linux-image-3.0.0-13-generic linux-headers-3.0.0-13-generic

And reboot a last time.