June 2008

Random Wallpaper

I was tired of staring at an LCD all day while it is sunny and blue skies outside. To tide me over until vacation, I downloaded some landscape photos and scripted my wallpaper to rotate randomly.

/home/brett/bin/random-wallpaper

#!/bin/bash
DIR=$HOME/Pictures/wallpaper
WALLPAPER=$( ( for i in `ls $DIR`; do
    echo $RANDOM $i
  done
) | sort | sed -r 's/^[0-9]+ //' | head -1 )
gconftool -t string -s /desktop/gnome/background/picture_filename $DIR/$WALLPAPER

Crontab:

*/3 * *   *   *   /home/brett/bin/random-wallpaper

Credits to:

http://hivearchive.com/2007/10/18/bash-one-liner-to-randomize-lines-in-file/

http://joeamined.wordpress.com/2008/02/15/automatically-changing-wallpaper-relatively-to-daytime-in-ubuntu/

ubuntu

Comments (0)

Permalink

Firefox 2 and 3 Dual Install

I need to test our application in our supported browsers, including both Firefox 2 and Firefox 3. Also, some of the extensions that I use don’t yet work with FF3.

We can sandbox the ‘foxes (and their settings, extensions) by creating distinct profiles and wrapper scripts to run each version of FF with its respective profile.

Fire up the Profile Manager:

firefox -ProfileManager

and create a new profile (”ff3″)

For consistency’s sake, edit ~/.mozilla/firefox/profiles.ini and rename “Default” to “ff2″:

[Profile0]
Name=ff2
IsRelative=1
Path=2k5iwgg1.default

[Profile1]
Name=ff3
IsRelative=1
Path=2zopbwoy.ff3

Create a couple of shell scripts (ff2 and ff3):

#!/bin/sh
firefox-2 -P ff2
#!/bin/sh
firefox-3.0 -P ff3

and you are done. Mine live in ~/bin (which is prepended to my path), along with a symlink ‘firefox’ pointing to ff2. Once all my must-have extensions are upgraded, I’ll change the symlink to point to ff3.

firefox
ubuntu

Comments (0)

Permalink

rxvt-unicode yellow box be gone

Wilmer has the fix for rxvt-unicode popping a little yellow box full of ticky-tacky when I hit CTRL-SHIFT. Tweaked instructions, with my preferred package:

apt-get source rxvt-unicode
sudo apt-get build-dep rxvt-unicode
cd rxvt-unicode-*
perl -pi -e 's/--enable-iso14755/--disable-iso14755/g' debian/rules
dch -n 'disable iso14755'
fakeroot debian/rules binary
sudo dpkg -i ../rxvt-unicode_*.deb

ubuntu

Comments (0)

Permalink

Ubuntu, Firefox 2, and Sun Java Plugin

Setup: Ubuntu Hardy Heron 8.04, Firefox 2

I installed the Sun Java 6 plugin via the Firefox plugin finder GUI, but applets still didn’t work. Viewing about:plugins did not list Java.

I tried a good swift kick to the package manager:

sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts

Still no joy. The trick turned out to be adding a symlink in /usr/lib/firefox/plugins:

sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins

Some pages that helped:
http://ubuntuforums.org/archive/index.php/t-578049.html
http://www.egir.dk/phpBB3/viewtopic.php?f=17&t=3758

And a related (?) bug:
https://bugs.launchpad.net/ubuntu/+source/classpath/+bug/239017

ubuntu

Comments (0)

Permalink