My Linux Webcam

When I bought me PC last year it came with a small little webcam which never worked for me until today when I plugged it in and Ubuntu Linux detected it using the Spca5xx driver. This is what the kernel reported:
“USB SPCA5XX camera found. SONIX sn9c102 + Pas106”
Easycam made it easy enough to install new drivers, and Camorama is a useful tool to control it. (via)

Unfortunately this isn’t very exciting for a number of reasons:

  • It has a manual focus and doesn’t handle changes in light very well.
  • I can’t get it to capture more than 176×144 352×288.
  • There’s no busy road or traffic to see from my window. I could point it at the LEDS on my DSL router?

Oh well! That was fun for five minutes!


An exciting scene in blarney today

TuxKart 3D racer!

apt-cache search racing returns a number of interesting looking games, one of which is TuxKart by Steve and Oliver Baker. A quick “apt-get install” and I was up and racing!

The game itself is simple, and if you’ve played any of the other kart games around it’ll be familiar. I laughed when Tux first ran over a fish and heard a big gulp sound but it might get annoying to those around you, so turn the volume down!

Check out the homepage linked above for screen shots!

Gizmo – A free phone for your computer

I tried Gizmo a few nights ago and it works really well! The conference feature could be invaluable for global groups who need to keep in touch.

I’m probably one of the few people in the world who hasn’t used Skype so I can’t compare yet. Skype does offer almost-worldwide calls at 2c/minute I think but for calling the US, Gizmo is better at 1c/minute!

Even better, just like Skype, Gizmo also runs on Linux!
(Edit: the url for this entry has been updated because when I copy/pasted the title I brought over a strange “-” character that the post slug didn’t like! You should be able to click this entry now!)

Upgrading to Ubuntu Breezy

I resisted for as long as possible, but I finally upgraded to Ubuntu Breezy.
It was quite easy in the end. The upgrade notes and this page were of some help of course.
Be warned, that if you have GNUcash installed on Hoary, you should uninstall it. I didn’t and ran into these problems with libofx2. How to fix? Uninstall gnucash with the following command:

dpkg -r gnucash
dpkg -r gnucash-common

Now, run apt-get -f install and finally apt-get dist-upgrade again!

I can’t run GNUcash yet, I hope they get this fixed soon! (In an ironic twist, launchpad.net is down for maintenance, it’ll be back later!)

Later! I discovered how to fix the problem with libofx2! You need to remove libofx0c102 first!

# apt-get remove libofx0c102
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
libofx0c102
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 803kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 84490 files and directories currently installed.)
Removing libofx0c102 ...
# apt-get install libofx2
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
libofx2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/454kB of archives.
After unpacking 3731kB of additional disk space will be used.

Preconfiguring packages ...
(Reading database ... 84466 files and directories currently installed.)
Unpacking libofx2 (from .../libofx2_1%3a0.8.0-3ubuntu8_i386.deb) ...
Setting up libofx2 (0.8.0-3ubuntu8) ...
# apt-get install gnucash
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
gnucash-common
Suggested packages:
gnucash-sql gnucash-docs
The following NEW packages will be installed:
gnucash gnucash-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/4194kB of archives.
After unpacking 16.6MB of additional disk space will be used.
Do you want to continue [Y/n]?

Preconfiguring packages ...
Selecting previously deselected package gnucash-common.
(Reading database ... 84713 files and directories currently installed.)
Unpacking gnucash-common (from .../gnucash-common_1.8.10-18_all.deb) ...
Selecting previously deselected package gnucash.
Unpacking gnucash (from .../gnucash_1.8.10-18_i386.deb) ...
Setting up gnucash-common (1.8.10-18) ...
Setting up gnucash (1.8.10-18) ...

Bash Fun – history and navigation

Garret posted two very useful tips on his blog:

  1. Search history in bash – Hitting CTRL-r allows you to search the Bash history by typing a word. It’ll match the word and bring up that command!
  2. Super-useful inputrc enables you to CTRL-left and CTRL-right through your current command line, just like in the good ol’ DOS days!

Can’t believe the inputrc stuff isn’t enabled by default and I wish I knew the first one a long time ago!

Converting RAW files to Jpeg, Nautilus Style

Further to my previous attempts to convert RAW files to Jpeg, here’s a Nautilus script based on this script. How do you use it? The g-scripts FAQ has more, although in Ubuntu I had to copy the script into ~/.gnome2/nautilus-scripts/
This script uses “Zenity” to display a nice progress bar while the conversion takes place.

#!/bin/bash

(while [ $# -gt 0 ]; do
dcraw -c -a -n -h $1 | ppmtojpeg > `basename $1 cr2`jpg
echo $1
shift
done) | zenity --progress --pulsate --text "Converting RAW files to Jpeg"

Converting RAW to Jpeg in Linux

Dcraw is an amazing open source app that decodes many RAW formats to a more usable format for computer manipulation. It’s used by many commercial programs including Google’s Picassa!
It outputs pnm files, but with a little command line magic it can be used to convert a directory of RAW files to Jpeg.
Canon cameras produce RAW files with the extension “.cr2” so:

for i in *.cr2; do dcraw -c -a -n -h $i | ppmtojpeg > `basename $i cr2`jpg; echo $i done; done

This produces low quality jpeg images alongside your RAW images which makes it useful when browsing the directory with a file manager that doesn’t understand RAW.
You could have the camera produce the low quality jpeg images but why sacrifice the space on your media card?
It goes without saying that this will work on any UNIX platform that Dcraw supports!