Firefox as your default browser

I am trying to make the switch to firefox from galeon because of an extension I can’t live without, and I was having trouble when I set firefox as my default browser. When I opened links from other applications, they weren’t popping up in new tabs despite the preferences I set. So, I wrote a little script to correct the behavior:

firefox --remote "ping()"
if [ $? = 0 ] ; then
	firefox --remote openURL\("$1",new-tab\)
else
	firefox $1
fi

I saved this as firefox.sh, and set my default browser to firefox.sh

(Note, I am not using Tabbed Browser Extensions because it’s buggy, bloated, and holy fuck does it have too many options.)

importing photos in gnome

Thanks to HAL, dbus, and the whole alphabet soup, we can execute a script when we plug in our digital camera. The default, running f-spot, doesn’t really do much good. It doesn’t accomplish what it should, namely moving all the files from the camera to our hard drive. Here’s a script I wrote that will actually do that, and it even has a progress bar! It will also create new directories if you import multiple rounds of photos, to prevent overwriting of images. Note that you need zenity in order for this to work.
Continue reading “importing photos in gnome”

yum of the day

Every so often I’ll post something you can yum install that is neat or hip or something. Debian people are probably laughing at me now, but the point is not that yum is easy like apt-get, but that there’s a lot of cool software out there that goes unnoticed. Being able to try it out with a simple yum install just makes it easier to experiment and play around with your desktop.

For instance, yesterday I discovered mplayerplug-in. For a while embedded videos in web pages have been a problem, but no more! Mplayerplug-in is a mozilla plugin that adds support for a whole raft of videos, like quicktime and wmv. It uses mplayer (naturally) for its backend, but it also features advanced high-tech state-of-the-80s gui elements, like “stop” and “rewind.” For mplayer, this is a big step, and it brings a tear to my eye.

mplayerplug-in is hosted by the DAG yum repository, so just make sure that you have dag in your yum.conf. There is a conflict between mplayer as provided by livna and mplayer as provided by dag, but only dag has mplayerplug-in. So just do yum install mplayerplug-in and yum will retrieve the proper version of mplayer for you.

Note that another popular plugin is mozplugger, which also tries to add mplayer support for mozilla. I don’t know what happens when the two collide, so you should edit your /etc/mozpluggerrc and remove the lines that talk about video. Then remove your ~/.mozilla/pluginreg.dat so that the next time you launch mozilla (or a mozilla-based app) it will properly reread the mozpluggerrc.

Mozplugger is great, and I can go to apple.com/trailers with the confidence that movies will play and my friends will be impressed.

making metacity a little more like sawfish — but in a good way!

Sawfish is dead. I know, I love the million keybinding options, and the cool regexp-based window matching, but as the xorg server moves forward, sawfish stays maddeningly still. So here are some things I’ve figured out to make metacity a little more like home for us sawfish people.
Continue reading “making metacity a little more like sawfish — but in a good way!”

speeding up yum a little

problem: Yum is incredibly slow
solution: run yum -C, which bypasses updating all of the headers and goes with whatever is already in your cache. Obviously you’ll have to update your cache once in a while, but for day-to-day installing of packages you can safely skip the update.

You upgraded to Fedora… what are you missing?

My main computer is a laptop I’ve upgraded from Redhat 9 through Fedora Core 2. The interesting thing about upgrading the OS instead of installing from scratch is that the upgrader only upgrades the packages you already had. It often won’t install new packages that are included in the new version, but aren’t strictly required to run.

The extended entry below contains a list of packages I’ve noticed weren’t installed on my machine, but definitely should have been. I will update the list as I notice new packages I’ve been missing.
Continue reading “You upgraded to Fedora… what are you missing?”

unwordwrap a file

I hate when I get a text file that I want to load onto my Palm device, and I find it’s already full of newlines. When I use txt2pdbdoc the pre-wrapped lines end up making the display of the file a headache to use. It’s like old emails you used to receive:

Hi, my name is Owen
Williams
and for some reason
my
software is a little narrower
than
yours so everything
looks
like crap.

Well here’s a python script that will remove newlines from any text file. It’s really quick and stupid. (See extended entry)
Continue reading “unwordwrap a file”