Ubuntu post installation

This is a walk through for installing Ubuntu with all the customisations I use.

Update the proxy server

sudo vi /etc/environment
...
http_proxy="http://proxy:3128/"
ftp_proxy="ftp://proxy:3128/"
https_proxy="https://proxy:3128/"

Include Canonical’s partners

Uncomment the following lines

sudo vi /etc/apt/sources.list
...
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner
...

Install the NVidia drivers

System ~ Administration ~ Hardware Drivers
or

sudo apt-get install build-essential linux-source linux-headers-`uname -r`
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings
sudo /sbin/lsmod | grep nvidia
sudo depmod -a
sudo modprobe nvidia_current
sudo /etc/init.d/lightdm restart

Packages

sudo apt-get install -y ntp
sudo apt-get install -y smartmontools
sudo apt-get install -y vlc mozilla-plugin-vlc vdpau-va-driver
sudo apt-get install -y mythtv-frontend mythtv-doc
sudo apt-get install -y mythtv-status mythgallery mythweather mythnews
sudo apt-get install -y mythvideo mythmusic projectm-pulseaudio libvisual-projectm
sudo apt-get install -y mythbuntu-lirc-generator
sudo apt-get install -y mythtv-theme-mythbuntu mythbuntu-apple-trailers
sudo apt-get install -y nfs-kernel-server
sudo apt-get install -y ssh
sudo apt-get install -y iotop
sudo apt-get install -y hplip-gui
sudo apt-get install -y k9copy
sudo apt-get install -y default-jre default-jdk default-jdk-doc libmysql-java
sudo apt-get install -y unrar rar
sudo apt-get install -y unison unison-gtk
sudo apt-get install -y flashplugin-installer
sudo apt-get install -y devede
sudo apt-get install -y mplayer
sudo apt-get install -y ubuntu-restricted-extras
sudo apt-get install -y ffmpeg
sudo apt-get install -y lirc
sudo apt-get install -y eyed3
sudo apt-get install -y kid3-qt
sudo apt-get install -y mkvtoolnix
#sudo apt-get install -y picard
sudo apt-get install -y traceroute
sudo apt-get install -y gnome-do
sudo apt-get install -y compizconfig-settings-manager
# Not sure if these are necessary
# sudo apt-get install -y gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad

Server only

sudo apt-get install -y mythtv-backend mythweb
sudo apt-get install -y samba samba-tools
sudo apt-get install -y mdadm

Desktop only

sudo apt-get install -y netbeans maven2
sudo apt-get install -y tomcat6 tomcat6-admin tomcat6-docs tomcat6-examples
sudo apt-get install -y glassfish-javaee
sudo apt-get install -y mysql-admin
sudo apt-get install -y skype
sudo apt-get install -y blueman
sudo apt-get install -y wally
sudo apt-get install -y xsane
sudo apt-get install -y xbindkeys xautomation

Chrome

wget -q -O - dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get -q update
sudo apt-get install -y google-chrome-stable

Grub-customizer

This can configure grub, and is useful for adding custom resolutions for monitors that are TVs

sudo apt-add-repository ppa:danielrichter2007/grub-customizer 
sudo apt-get update 
sudo apt-get install grub-customizer

Medibuntu

From Medibuntu
Ubuntu Geek – Installing multimedia Codecs

sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get -q update
sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring
sudo apt-get -q update
# For i386 Users install Codecs using the following command
sudo apt-get install w32codecs libdvdcss2
# For amd64 Users install Codecs using the following command
sudo apt-get install w64codecs libdvdcss2

XMBC

From XMBC wiki

sudo apt-get install -y python-software-properties pkg-config
sudo add-apt-repository ppa:team-xbmc
sudo apt-get update
sudo apt-get install -y xbmc xbmc-standalone
sudo apt-get update

Kid3 ID3 tag editor

Download from Kid3 as Ubuntu 10.04 shows 1.3 rather than the latest 1.5.
There is a requirement to update the qt libraries when using 1.5 rather than the Ubuntu inbuilt 1.3

sudo add-apt-repository ppa:msb/ppa
sudo apt-get update
sudo apt-get install -y kid3-qt
sudo apt-get update

Flash 64bit

Taken from Help4Linux

sudo add-apt-repository ppa:sevenmachines/flash
sudo apt-get update && sudo apt-get install flashplugin64-installer

Handbrake

sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake-gtk handbrake-cli

Can try ppa:stebbins/handbrake-snapshots if things are not working.

Banshee daily builds

sudo add-apt-repository ppa:banshee-team/banshee-daily
sudo apt-get update && sudo apt-get -y upgrade

Firefox

Install the plugins

  • Scribefire Blog Editor
    • Blog url: http://lazygeek.co.uk/
    • Use Metaweblog API
    • Path http://lazygeek.co.uk/roller/roller-services/xmlrpc
  • Adblock Plus
  • Download Statusbar
  • Fission
  • GBookmarks

Panel Customisation (10.10)

  • Add to Panel… ~ Remote Desktop Viewer
  • Add to Panel… ~ System Monitor

Panel Customisation (11.04)

Weather

sudo apt-get install -y indicator-weather

System monitor

sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install -y indicator-multiload

Key Indicator

sudo add-apt-repository ppa:tsbarnes/indicator-keylock
sudo apt-get update
sudo apt-get install indicator-keylock

Turn off update notifier

gconftool-2 --set /apps/update-notifier/auto_launch --type bool 0

Turn off Screen Lock

gconftool-2 --set /apps/gnome-screensaver/lock_enabled --type bool 0

Note this you seem to have to go into gconf-editor to disable screen lock for hibernate/sleep, the command line does not work!

gconftool-2 --set /apps/gnome-power-manager/lock/hibernate --type bool 0
gconftool-2 --set /apps/gnome-power-manager/lock/suspend --type bool 0
gconftool-2 --set /apps/gnome-power-manager/buttons/suspend --type string "nothing"
gsettings set org.gnome.settings-daemon.plugins.power button-suspend "nothing"
gsettings set org.gnome.settings-daemon.plugins.power button-sleep "nothing"
gsettings set org.gnome.settings-daemon.plugins.power button-hibernate "nothing"

Power Management settings

Enable the disks to spin down if required

gconftool-2 --set /apps/gnome-power-manager/disks/spindown_enable_battery --type bool 1
gconftool-2 --set /apps/gnome-power-manager/disks/spindown_enable_ac --type bool 1

Network mounts

sudo mkdir -p /mnt/apps /mnt/backup /mnt/films /mnt/home /mnt/inbox /mnt/library /mnt/mirrors /mnt/tv /mnt/music /mnt/software /mnt/vmachines /mnt/myth
sudo vi /etc/fstab
# NFS Volumes
homer:/media/apps /mnt/apps nfs rw,hard,intr 0 0
homer:/media/backup /mnt/backup nfs rw,hard,intr 0 0
homer:/media/films /mnt/films nfs rw,hard,intr 0 0
homer:/media/home /mnt/home nfs rw,hard,intr 0 0
homer:/media/inbox /mnt/inbox nfs rw,hard,intr 0 0
homer:/media/library /mnt/library nfs rw,hard,intr 0 0
homer:/media/mirrors /mnt/mirrors nfs rw,hard,intr 0 0
homer:/media/tv /mnt/tv nfs rw,hard,intr 0 0
homer:/media/music /mnt/music nfs rw,hard,intr 0 0
homer:/media/software /mnt/software nfs rw,hard,intr 0 0
homer:/media/vmachines /mnt/vmachines nfs rw,hard,intr 0 0
myth:/media/myth /mnt/myth nfs rw,hard,intr 0 0
sudo mountall

Setup symbolic links

cd /mnt
sudo ln -s /mnt/library/music
sudo ln -s /mnt/store/apps
sudo ln -s /mnt/store/backup
sudo ln -s /mnt/store/software
sudo ln -s /mnt/store/home/rob robs
cd ~
ln -s /mnt/apps/bin
rmdir Videos; ln -s /mnt/films Videos
rmdir Pictures; ln -s /mnt/home/rob/My\ Pictures Pictures
rmdir Music; ln -s /mnt/music Music
rmdir Documents; ln -s /mnt/home/rob Documents
rmdir Downloads; ln -s /mnt/inbox Downloads

HP Photosmart C7280

  • System ~ Administration ~ Printing

The printer should appear after a delay within the network section, make sure the HP hplip drivers are selected.

Configure the Remote Desktop

gconftool-2 --set /desktop/gnome/remote_access/enabled --type bool 1
gconftool-2 --set /desktop/gnome/remote_access/prompt_enabled --type bool 0
gconftool-2 --set /desktop/gnome/remote_access/vnc_password --type string $(echo -n 'mypassword'|base64)

Configure Terminal

gconftool-2 --set /apps/gnome-terminal/profiles/Default/use_system_font --type bool 0
gconftool-2 --set /apps/gnome-terminal/profiles/Default/font --type string "Monospace 8"
gconftool-2 --set /apps/gnome-terminal/profiles/Default/default_show_menubar --type bool 0
gconftool-2 --set /apps/gnome-terminal/profiles/Default/scrollback_unlimited --type bool 1

Configure Nautilus

gconftool-2 --set /apps/nautilus/preferences/default_folder_viewer --type string "list_view"
gconftool-2 --set /apps/nautilus/preferences/show_directory_item_counts --type string "always"
gconftool-2 --set /apps/nautilus/preferences/show_image_thumbnails --type string "always"
# Not sure how to set -1 (which the GUI does for no limit)
# gconftool-2 --set /apps/nautilus/preferences/thumbnail_limit --type int "-1"
gconftool-2 --set /apps/nautilus/preferences/thumbnail_limit --type int 301989888
gconftool-2 --set /apps/nautilus/list_view/default_zoom_level --type string "smallest"

Configure the appearance

gconftool-2 --set /desktop/gnome/interface/font_name --type string "Ubuntu 9"
gconftool-2 --set /desktop/gnome/interface/document_font_name --type string "Sans 9"
gconftool-2 --set /desktop/gnome/interface/monospace_font_name --type string "Monospace 9"
gconftool-2 --set /apps/metacity/general/titlebar_font --type string "Ubuntu Bold 9"
gconftool-2 --set /apps/nautilus/preferences/desktop_font --type string "Ubuntu 9"

Configure Evolution

Setup Mail, Calendar and Contacts to sync with google

Configure NTP System

sudo vi /etc/ntp.conf
...
server time

Configure MythTV

sudo dpkg-reconfigure mythtv-common

Edit Password stored in /etc/mythtv/mysql.txt

Configure Rhythmbox

Set the default library location

gconftool-2 --set /apps/rhythmbox/library_locations --type string "[file:///home/rob/Music/library]"

Configure bluetooth

The default PIN for a mouse is 0000 \\
Add the hid_apple module to be loaded at boot time (will allow the keyboard to work). make sure you repeat the PIN on the actual keyboard as well as the input box.

sudo vi /etc/modules
...
hid_apple

The bluez package that comes with Ubuntu 10.10 doesn’t seem to like the apple keyboard and mouse. Use a later ppa instead. See the bug here

sudo add-apt-repository ppa:brian-rogers/ppa
sudo apt-get update
sudo apt-get install bluez

Fix Grub autobooting on bluetooth keyboards

If booting fails for some reason grub will set the recordfail flag so you can choose another kernel if required. The problem is that it sets the timeout to -1 so if you are using a bluetooth keyboard you cannot press enter. Fix this by changing the timeout from -1 to a sensible value:

sudo vi /etc/grub.d/00_header
...
make_timeout ()
{
cat << EOF
if [ "\${recordfail}" = 1 ]; then
# Updated from -1 to 10 to still allow auto-booting
#set timeout=-1
set timeout=10
else
set timeout=${2}
fi
EOF
}
...

Now update grub

sudo update-grub