Hacking Gnome’s OSD colors under Ubuntu
I finally decided to hack my mail filter to display a brief summary of incoming non-spam email via OSD, but something had to be done about the vomit/birdshit color scheme that gnome-osd-server was using by default.
Since its configuration GUI, gnome-osd-properties, doesn’t have anywhere you can change the colors, I realized it was probably going to come down to tracking down where the colors are hardcoded and changing them by hand.
Thankfully, the relevant programs were written in Python, and I didn’t have to go compile anything from source — don’t get me wrong, I grew up on the command line, and at least 75% of my time is spent in xterms, but I’ve found that fighting with your package manager is, more often than not, more of a pain in the ass than it’s worth.
Anyway, enough irrelevant crap. The file you’ll want to edit is /var/lib/python-support/python2.5/gnomeosd/server.py.
29 30 bgcolor = "#ffffff" fgcolor = "#000000"
I had originally written here that you could just kill gnome-osd-server, but that appears to respawn a new process for every OSD message afterwards. Probably not such a great idea. I suggest that, once you get a couple colors you like, you simply bounce the X server (log out, log back in).
Enjoy your new OSD color scheme under Gnome.
