Why?
After having, and not using, Ubuntu 11.10 on my laptop for some time, trying in vain to get used to it, I realized I cannot resist the urge to update so I decided to search for alternatives. One was xubuntu which has an xfce4 based interface which I could customize in about 15 mins to look and feel exactly as I was used to. As such I migrated to xubuntu 11.10. Of course I could have installed the xfce package in the default ubuntu but I realized I messed it up so much by installing various things trying to make it look more familiar that I decided to start fresh. On the occasion I also wrote a small migrate script which will help me test other distributions in a simpler way. It’s self explanatory and I post it at the end. Until then some small tinkering required in xubuntu.
Projector switch
As I described in length in a previous post, one of the features I need on my laptop is the ability to switch to an external projector easy. As pressing Fn+F8 worked in previous ubuntu versions and doesn’t work anymore this is the simplest solution I could find, compared to the lengthy one of using nvidia-settings all the time:
apt-add-repository ppa:disper-dev/ppa
apt-get update
apt-get install disper
and then
disper -c
Grub params
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_sleep=s3_bios pcie_aspm=force acpi_osi=\\\"!Windows 2009\\\""
you can find more information on each of these parameters in a previous post and some of them might be not needed.
Display profiles
See this article
Add my preferred themes
sudo add-apt-repository ppa:tiheum/equinox && sudo apt-get update
sudo apt-get install <del>gtk2-engines-equinox equinox-theme</del> faenza-icon-theme
go to http://xfce-look.org/content/show.php/Orta?content=134123 and follow the instructions for installing orta.
Orta is not gtk3 compatible so many gtk3 applications look different. The solution is to search for a gtk2/gtk3 theme such as: http://gnome-look.org/content/show.php/Zukitwo?content=140562 After unpacking the archives to /usr/share/themes the following is required to enable the theme for gtk3
ln -s /usr/share/themes/Zukitwo/gtk-3.0 ~/.config/
Install oracle
Don’t bother with version 11, I spent 30 mins trying then gave up and reverted to version 10 which works like a charm
sudo apt-get install libaio1:i386
sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.0_i386.deb
If you need to install cx_oracle or need to use the instantclient on 64 bit and run into conflicts with libaio:i386 please read this article, updated for 11.10.
Install flash debug
Download 32 bit flash debug, unpack then run:
nspluginwrapper -i path_to_.../flashplayer_11_plugin_debug.i386/libflashplayer.so
Suspend on lid close
One of the features I really use is suspend on lid close. This does not seems to work by default but it’s easy to fix.
1. comment the line
#if [ `CheckPolicy` = 0 ]; then exit; fi
from /etc/acpi/lid.sh
2. create a file /etc/acpi/local/lid.sh.post with the following content:
<del>#!/bin/sh pm-suspend</del>
After all this trouble I realized there was a configuration screen where I could choose what happens where I close the lid. Very smart from me :)
Migration script
<pre lang="bash">#!/bin/bash
#migrate data from an ubuntu version to another
#Version $Revision: 1.4 $, updated for Ubuntu 11.10
#author len@len.ro
OLD=$1
#change to DEBUG=echo just to print the commands
DEBUG=
#change n to y to enable a migration stage, none enabled by default
#repositories
ADD_REPOSITORIES=n
#packages
ADD_PACKAGES=n
#configuration for applications
SYNC_CONFIG=n
#other
SYNC_OTHER=n
#bash history
SYNC_BASH_HIST=n
#personal devel
SYNC_DEVEL=n
if [ ! -d $OLD ] || [ "x$OLD" == "x" ]; then
echo Usage "$0 dir" where dir is the old home
exit
fi
if [ "$ADD_REPOSITORIES" == "y" ]; then
#medibuntu
$DEBUG sudo -E wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
#canonical
$DEBUG sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
fi
if [ "$ADD_PACKAGES" == "y" ]; then
$DEBUG echo You need to download and install skype and googleearth manually
#media
$DEBUG sudo apt-get install mplayer w64codecs inkscape gqview thunderbird ttf-mscorefonts-installer libdvdcss2 libdvdnav4 libdvdread4 jhead exiftags pidgin libxml-feed-perl chromium-browser gimp audacious audacity gphoto2 gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly libreoffice argyll
#GPS
$DEBUG sudo apt-get install qlandkarte gpsbabel
#networking
$DEBUG sudo apt-get install traceroute lsof iptraf nload openvpn ssh wireshark aircrack-ng geoip-bin ecryptfs-utils
#vnc
$DEBUG sudo apt-get install tightvncserver x11vnc xtightvncviewer fluxbox
#development
$DEBUG sudo apt-get install cvs meld emacs
#other
$DEBUG sudo apt-get install hamster-applet wine shutter tomboy
fi
if [ "$SYNC_CONFIG" == "y" ]; then
#gaim/pidgin, mozilla, mozilla-thunderbird, ssh keys, skype, tomboy, chromium, googleearth, hamster
DIRS=".purple .mozilla .thunderbird .ssh .Skype .config/tomboy .local/share/tomboy .config/chromium .googleearth .local/share/hamster-applet"
for DIR in $DIRS; do
$DEBUG mkdir -p ~/$DIR
$DEBUG rsync -axv --delete $OLD/$DIR/ ~/$DIR/
done
fi
if [ "$SYNC_OTHER" == "y" ]; then
DIRS=".private Private .ecryptfs scripts vpn cycling"
for DIR in $DIRS; do
$DEBUG mkdir -p ~/$DIR
$DEBUG rsync -axv --delete $OLD/$DIR/ ~/$DIR/
done
fi
if [ "$SYNC_BASH_HIST" == "y" ]; then
echo Migrating old bash history up to a limit of 10000 lines
$DEBUG sed -i 's/HISTSIZE=.*/HISTSIZE=10000/g' ~/.bashrc
$DEBUG sed -i 's/HISTFILESIZE=.*/HISTFILESIZE=20000/g' ~/.bashrc
#sudo sed -i 's/HISTSIZE=.*/HISTSIZE=10000/g' /root/.bashrc
#sudo sed -i 's/HISTFILESIZE=.*/HISTFILESIZE=20000/g' /root/.bashrc
$DEBUG cp $OLD/.bash_history ~/.bash_history
echo "Must kill all bash instances, press enter then restart bash"
$DEBUG read b
$DEBUG pkill -9 bash
fi
if [ "$SYNC_DEVEL" == "y" ]; then
$DEBUG cp -r $OLD/.sqldeveloper ~/
$DEBUG cp -r $OLD/eclipse-3* ~/
fi
It can be run as ./migrate.sh /other/home/len where the old install is mounted in /other