Hardware installation procedure

20/12/2009


Status




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

Type:

sudo apt-get install aptitude
Fix backlighting

Edit the file:

sudo vi /etc/default/grub

Replace the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

With

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"

Then apply without reboot with

sudo update-grub
Improve unity

Create some folder in /data :

sudo chown -R guenmat /data
mkdir /data/Téléchargements
mkdir /data/Projets
mkdir /data/Documents
mkdir /data/Images
mkdir /data/Musique
mkdir /data/Vidéos
mkdir /data/Applications

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

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

Add mass renaming by installing:

Uncompress the following file content:

in the user shortcuts folder:

/home/guenmat/.local/share/applications

Then type:

sudo apt-get install compizconfig-settings-manager

Lancer CompizConfig Settings Manager, cliquer sur "Ubuntu Unity Plugin", puis sur l'onglet "Launcher" et cocher l'option "Minimize single window applications (unsupported)"

Finally, in order to use the new global menu in Java applications, type:

sudo add-apt-repository ppa:danjaredg/jayatana
sudo apt-get update
sudo apt-get install jayatana
Configure ufw firewall

Install ufw firewall:

sudo aptitude install ufw

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 (serveur de temps) :

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
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
sudo mkdir /nas/Freebox
sudo mkdir /nas/Android

With the proper rights:

sudo chown -R guenmat /nas

Give administrator privileges to the current user:

sudo visudo

Add the following line at the end of the file:

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

Reload with:

sudo -v

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.100/Documents /nas/Documents -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Livres /nas/Livres -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Musique /nas/Musique -o username=LOGIN,password=PASSWORD,iocharset=utf8,noserverino,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Photos /nas/Photos -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Projets /nas/Projets -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Sauvegardes /nas/Sauvegardes -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Video /nas/Video -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Tmp /nas/Tmp -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.0.100/Download /nas/Download -o username=LOGIN,password=PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777

The option "noserverino" is usefull only for Google music in order to detect changes on drive.

Change script file execution rights:

chmod +x ~/mountnas.sh

To apply the new configuration without reboot:

sudo mount -a

To disable the configuration:

sudo umount -a
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
Install Ubuntu tweak

Type:

sudo add-apt-repository ppa:tualatrix/next
sudo aptitude update && sudo aptitude install ubuntu-tweak
Google Chrome

Download the latest google chrome at:

Then type:

sudo aptitude install libgconf2-4 libxss1 libappindicator1
sudo dpkg -i google-chrome-stable_current_*.deb
Install softwares

• Cheese

• VLC

• MPlayer

• Filezilla

• All greffons for vidéos codecs

• Comix

• Puddletag

• Subtitle editor

• Gimp

• MP3 Diags

• Convertisseur de sons

• Evince

• Unity Tweak Tool

• FBReader

• Pyrenamer

• Calibre

Install Calibre

Install:

sudo add-apt-repository ppa:n-muench/calibre
sudo aptitude update && sudo aptitude install calibre

Launch Calibre and change the backup model with:

{authors}/{series:||/}{authors} - {series_index:0>2s|| - }{title}

After exporting ebooks, remove all unnecessary files with:

find . -name "*.opf" -exec rm -rf {} \;
find . -name "*.jpg" -exec rm -rf {} \;
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-netbook

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-netbook

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.