Posts Tagged ‘apps’

Moving photos around behind f-spot’s back

Sunday, July 2nd, 2006

I’ve been using f-spot since it showed up in Ubuntu/Breezy and have been keeping all my photos in a directory structure like this:


But sometimes I’ve forgotten to unclick the “Copy file to the Photos folder” box in the photos import dialog and end up with photos under ~/Photos/. Recently I checked and found there were almost a gigabytes worth of photos under there.

So this is what I did to move them to under /PHOTOS/Photos/ and keep all the tags and metadata correct.

  • Back up /home and /PHOTOS to an external USB. I love rsnapshot.
    $ rsnapshot daily
  • make an extra backup of the f-spot database
    $ cp ~/.gnome2/f-spot/photos.db photos-backup.db
  • Start poking around the f-spot database and updating it.
    $ sqlite3 ~/.gnome2/f-spot/photos.db
    sqlite> .schema photos
    directory_path STRING NOT NULL,
    description TEXT NOT NULL,
    default_version_id INTEGER NOT NULL
  • See how many photos are in ~/Photos…
    sqlite> select count(*) from photos where directory_path like '/home/marc/Photos/%';
  • Take a look at a few of them to see the path names…
    sqlite> select directory_path from photos where directory_path like '/home/marc/Photos/%' limit 0,10;
  • Update the pathname to my prefered one. I’ve added an ‘a’ to the end just so I won’t overwrite an existing directory.
    sqlite> update photos set directory_path = "/PHOTOS/Photos/2006.06.22a" where directory_path = "/home/marc/Photos/2006/6/22";
    sqlite> .quit
  • Make the directory and move the files to the new location…
    mkdir /PHOTOS/Photos/2006.06.22a
    mv -v /home/marc/Photos/2006/6/22/HPIM117* /PHOTOS/Photos/2006.06.22a
  • Repeat for each directory. I did it all within emacs’ shell so cut-n-paste made it a snap.

Creative Webcam Live! works with Ubuntu/Dapper

Wednesday, June 7th, 2006

I just picked up a Creative Webcam Live! which does a reasonable 1024×768 snapshot and 640×480 video resolution for $49. At first it looked like I’d have to build the spca5xx kernel module for Ubuntu/Dapper, but it is now included in the default kernel & modules packages.

Just plug it in and start using one of the many video capture packages like camorama, webcam, camstream, motion, gqcam, etc and start playing around!

FWIW here below the fold are my loaded kernel modules:


w32codecs for ubuntu ‘hoary’

Friday, July 22nd, 2005

The stock Ubuntu repositories don’t include the w32codecs (wmvdmod.dll, etc) so xine, mplayer can play WMV and other formats. Basically the package puts 127 DLLs in /usr/lib/w32codecs.

So, I temporarily added the following line to my /etc/apt/sources.list

deb testing main

And then did this:

apt-get update && apt-get install w32codecs

I then commented that line out since and apt-get upgrade would have picked up a bunch of updated packages from that repository.

Migrating to Ubuntu Hoary on my laptop

Thursday, July 21st, 2005

I’ve been running Debian/Sarge (now the stable branch) on my laptop for quite a while now and its time to try a new distro for dailyl use — Ubuntu. This week I’ve been running Ubuntu ‘Hoary’ and the transition has been very smooth.

The only configuration issue was I wanted to use ALSA on this HP Compaq nc6000 laptop. The install did detect the sound device, but did separate the speaker from
the headphone controls.

phzi on #ubuntu pointed me to the unofficial, specifically the section configuresoundproperly. Those instructions were perfect.

ipodder (v2.1) on Ubuntu ‘Hoary’

Thursday, July 21st, 2005

I’d upgraded to the latest iPodder (v2.1) on my Ubuntu (‘Hoary’) laptop today.

# tar jxvf iPodder-linux-2.1.tar.bz2

# cd iPodder-linux

# sudo ./

(take the defaults)

The only glitch is wx libraries aren’t in the default PYTHONPATH, so set this environment variable either at the command line, or pop it in ~/.bashrc

export PYTHONPATH=/usr/lib/python2.4/site-packages/wx-2.5.3-gtk2-unicode/:$PYTHONPATH-unicode:$PYTHONPATH

Now clean up a little bit…

$ cd ../

$ rm -rf iPodder-linux iPodder-linux-2.1.tar.bz2

Now, you are all set to start iPodder!

$ (nohup iPodder&) # or add it to a menu bar button

Getting closer to not needing any special knowledge to get iPodder running on a GNU/Linux distro…

- – - – -

Just for searchers, this is the problem you see if you don’t set the PYTHONPATH:

$ iPodder
Traceback (most recent call last):
File "", line 38, in ?
import iPodderWindows
File "/opt/iPodder/", line 4, in ?
import listctrl as listmix
File "/opt/iPodder/", line 296, in ?
AttributeError: 'module' object has no attribute 'PyEventBinder'

fyi: straw database recovery

Friday, May 13th, 2005

This morning I accidentally double clicked on the straw RSS aggregator icon and two copies raced
to see who could corrupt the app’s database first.

straw refused to start with this error: DB_RUNRECOVERY: Fatal error, run
database recovery – - PANIC: Invalid argument
Recovery Error: See README for details on how to recover data.

And the straw README says to do this:

$ db_recover -h $HOME/.straw -c -v
$ db_checkpoint -1 -v

Fair enough, but I don’t have those scripts installed db\_recover or db\_checkpoint. It turns out that they are in the libdb2-util package. (apt-get install libdb2-util)

Fortunately the recovery processed work fine.

Getting the bleeding edge iPodder on Linux (debian/sarge) mini-HOWTO

Tuesday, January 4th, 2005

Lately, I’ve been using the bleeding edge version of iPodder from CVS (which confusingly is in the
iSpider directory) Here is how you can grab a copy for yourself:

$ cvs login
CVS password: (press return)

$ cvs -z3 co iSpider

[tons of informational messages about downloading iSpider]

$ cd iSpider
$ export PYTHONPATH=/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-unicode:$PYTHONPATH-unicode:$PYTHONPATH
$ python iPodderGui.pyw

… And fire up your favorite dev tools!

Creating an audio blog reply using Festival

Tuesday, October 26th, 2004

I listened to Dave Winer’s Coffee Notes for 24-Oct-2004 podcast on the way home tonight and felt compelled to reply to him with an audio reply email about Richard Scoble/Scooble’s voice mail. Here is how I created it.

* Get the Festival Speech Synthesis package for your Debian GNU/Linux box

$ sudo apt-get install festival

[...bunch of status about installing a festival and dependancies removed...]

* Create a snappy reply. I like emacs. This is exactly what hi-dave.txt looks like:

Hi Dave!

This is Marc No-zell and I just listened to your Coffee Talk with
Richard Scoble. It sounds like Microsoft’s voice mail system is using
a descendant of the DECK-talk system that was created by DECK in the

I’m creating this audio reply using the Festival Speech Synthesis
System on my Deb-ian GNU Linux laptop. Neener, neener, neener!

Well, thanks for the Coffee Notes!

Now I did do a little cheating here. Festival follows strict pronunciation rules and sometimes gets words wrong. For example my surname would be said as ‘nozzel’, so I spell it how I want it to sound. The same is true for DECtalk and DEC, which sounds like ‘dec-tork’ and ‘december’ (trying to be a little too clever ;-)

* Convert from text to wave format:

$ text2wave hi-dave.txt -o hi-dave.wav

* Convert from wav to mp3 format

$ lame hi-dave.wav hi-dave.mp3

* Listen to the result:

$ xmms hi-dave.mp3


Wednesday, October 2nd, 2002

I ran across this little app today. One of those things I was going to code up but never got around to doing.

gnobog (a Gnome Bookmarks Organizer)

Tuesday, May 28th, 2002

gnobog is a nice
little bookmark app. Since it use galeon, mozilla, konqueror and
other random web browsers, this lets me keep my bookmarks in one
central location.