How to bring back missing systray icons in Ubuntu/Unity

Ubuntu/Unity does not display any systray (notification area) icons anymore for a while now.  The reasoning behind this is, that not all systray icons behave(d) in a consistent way, therefore limiting the user experience [1].  The goal is to port all systray icons to “indicators”, but unfortunately this just has not happened yet for many popular applications, e.g. xchat.

Nevertheless, the systray is still there, and there is a whitelist which contains a list of all applications (e.g. Skype) that are still allowed to use it.

In order whitelist YOUR_APP, run the following commands (change YOUR_APP to your application)

wlold=$(gsettings get com.canonical.Unity.Panel systray-whitelist)
wlnew=$(python -c "print list(set($wlold + ['YOUR_APP']))")
gsettings set com.canonical.Unity.Panel systray-whitelist "$wlnew"

or, to whitelist all applications:

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

You might need to log out and log back in in order for the changes to take effect.


Fix Ubuntu Unity Grid/Tiling problems on T420

I had all sorts of problems on my Thinkpad T420 with Unity in Ubuntu 11.10, most notably that the grid/tiling feature did not work. I am using the on-board HD3000 graphics card with the i915 driver, but since my T420 has also a discrete graphics chip (which I had disabled in the BIOS) I also had the nvidia drivers installed.  However, this seemed to prevent the i915 drivers from loading correctly (e.g. glxgears did not run).  The work-around is to remove the nvdia-drivers and -settings packages:

sudo apt-get remove nvidia-settings nvidia-current

Reboot, and tiling should work again.

Reinstall all your packages after fresh install of Ubuntu

Sometimes you want to reinstall Ubuntu from scratch (i.e. instead of upgrading), but of course also reinstall all the packages that you had before. Beforereinstalling, dump your installed software with

dpkg --get-selections > installed-packages

and of course make sure you keep this file somewhere where it doesn’t get deleted during the install process. Then, after installing Ubuntu, reinstall all your packages with

# install dpkg which is not installed by default
sudo apt-get install dpkg

sudo dpkg --set-selections < installed-packages
sudo apt-get dselect-upgrade

Wait everything to install. Done.