rss
twitter
    Find out what I'm doing on Twitter

Howto Change Notification Colors in Ubuntu Jaunty

I really like Ubuntu Jaunty's notification system, which looks cool. However it lacks of customization and the notification system (notify-osd) may suck at some themes and wallpapers. Today we will change the color of notify-osd with a simple dirty hack :)

First let's install the dependencies:

$sudo apt-get install build-essential libnotify-bin

Now it is time to get required libraries to build notify-osd:

$sudo apt-get build-dep notify-osd

Create a tmp directory to work inside :

$mkdir ~/tmp ## It is under your home directory = /home/USERNAME ##

Navigate to newly created tmp directory and start working :

$cd ~/tmp && apt-get source notify-osd

After this operation (apt-get source), notify-osd-0.9.11 directory will be created under tmp directory.

Download this patch and apply it :

$cd ~/tmp/notify-osd-0.9.11/src
$wget -c https://dl.getdropbox.com/u/612498/notify-color-hack.patch
$patch < notify-color-hack.patch

You should get this output :

duyq@duyq-laptop:~/tmp/notify-osd-0.9.11/src$ patch < notify-color-hack.patch
patching file bubble.c
patching file main.c


If you do not get any errors, it is now time to configure notify-osd:

$cd ~/tmp/notify-osd-0.9.11 && ./configure --prefix=/usr
$make

Before installing it, test and customize it:

Create .notify-osd under your home directory and paste the following :

$gedit ~/.notify-osd

Paste and save :

bubble-background-color = 6D84B4
bubble-background-opacity = .85
text-title-color = ffffff
text-title-opacity = 1.0
text-body-color = ffffff
text-body-opacity = 1.0


This is the part you are going to customize notify osd! Do not forget to change the color codes!

Kill current running notify-osd:

$killall notify-osd

Now navigate to ~/tmp/notify-osd-0.9.11/src and test notify osd :

$cd ~/tmp/notify-osd-0.9.11/src
$./notify-osd

You should see

##reading settings from '/home/duyq/.notify-osd'##

at the terminal. If you see something like :

##** (notify-osd:xxxxx): WARNING **: Another instance has already registered org.freedesktop.Notifications ##

That means you did not kill the notify-osd process go and kill it :)

Now send a notification and complete the test :

$notify-send "test" "Do not test me"

If everything is ok, it is time to install it:

$cd ~/tmp/notify-osd-0.9.11
$sudo make install

###End of Installation###

3 comments:

Anonymous said...

you should make a ppa with it (at launchpad)

Anonymous said...

could you upload a screenshoot please??

Patrick said...

If you want to do this in Karmic you'll have to download the 0.9.11 release from here: https://launchpad.net/ubuntu/+source/notify-osd/0.9.11-0ubuntu3 because the patch did not work with the most current release (0.9.24) that you will get using apt in Karmic. Also, the link to the dropbox file is broken, I had to find the patch in the Ubuntu forums via Google.

Post a Comment