Ubuntu’s default music player for Gnome is Rhythmbox, in case you weren’t aware. It’s a decent enough player, though I’m told it fails at large collections, but I’m not here to plug it or rag on it.
One of its niftier features is software mixing. In other words, it can adjust the volume of the playing audio without adjusting the actual hardware volume levels for the soundcard.
This is cool for two reasons. First, there’s a CLI to get and set the player volume. It’s not very script-friendly, but it’s workable. Second, you can play something else at full volume while playing an mp3 at reduced volume.
For example, if your email client can execute a command when mail comes in, you can turn down the volume on the mp3, play a notification wav at full volume, and then turn the volume back up on the mp3. Mine happens to read a brief summary through the eSpeak speech synthesizer.
This program will turn the volume down on Rhythmbox, leaving the hardware volumes untouched and storing the volume for use by the second script. (more…)
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.
I got Ubuntu upgraded to 8.04. It took me a while to figure out that esound makes things very unhappy. If your Gnome desktop is hanging or otherwise misbehaving, try “sudo killall esd”, and “apt-get remove esound”.
Also, the rtl8187b driver does, indeed, dislike the 2.6.24 kernel (mine is 2.6.24-16-generic, and no, I don’t know why I’m not using the 64-bit version). I applied Hin-Tak Leung’s patch (here), and all is well — or, at least, as functional as it was with the 2.6.20 and 2.6.22 kernels.
I also got Cc’d in a couple emails to Andrea Merello, who basically said …well, to be honest, I have no idea what the hell it boils down to. I guess there’s still someone at the helm of the RTL8180 driver, and the rtl-wifi project isn’t as dead as it looks.
Also, thanks to the people who donated a couple bucks! You made me lose a bet with datamorph, damn it. :-)
Sorry again for the lag, I’m working on improving.