Monday, July 27, 2009

fix f-spot downgrade version crash database

Have you ever downgraded F-Spot from Debian Unstable to Stable, only to find that the moment you create a "version" of a photo, your entire F-Spot gallery becomes hosed?

The solution is to fix your database to not include the new fields that came with whatever that new version of F-spot was, and make it like it was back in F-Spot 0.4.4. F-Spot might even be nice and move your "broken" database to the root of your home folder. Never fear! Open up the file "photos.db" (which may be at ~/.gnome2/f-spot/) in your favorite SQL Lite editor (apt-get install sqlitebrowser). Now, modify the photos and the photos_versions table to remove the md5sum field. That's it!

They must have added md5sum because it was a good idea, but didn't consider all of us that might downgrade to a version that didn't know about this field!

Here are the errors you may see:

Starting new FSpot server

Unhandled Exception: Mono.Data.SqliteClient.SqliteExecutionException: SQL logic error or missing database
at Mono.Data.SqliteClient.SqliteCommand.ExecuteStatement (IntPtr pStmt, System.Int32& cols, System.IntPtr& pazValue, System.IntPtr& pazColName) [0x00000]
at Mono.Data.SqliteClient.SqliteCommand.ExecuteStatement (IntPtr pStmt) [0x00000]
at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32& rows_affected) [0x00000]
at Mono.Data.SqliteClient.SqliteCommand.ExecuteNonQuery () [0x00000]
at Banshee.Database.QueuedSqliteCommand.Execute () [0x00000]




Starting new FSpot server
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object
at FSpot.Utils.UriUtils.UriToStringEscaped (System.Uri uri) [0x00000]
at FSpot.ThumbnailGenerator.ThumbnailPath (System.Uri uri) [0x00000]
at FSpot.Widgets.IconView.DrawCell (Int32 thumbnail_num, Rectangle area) [0x00000]
at FSpot.Widgets.IconView.DrawAllCells (Rectangle area) [0x00000]
at FSpot.Widgets.IconView.OnExposeEvent (Gdk.EventExpose args) [0x00000]
at Gtk.Widget.exposeevent_cb (IntPtr widget, IntPtr evnt) [0x00000]
at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
at Gtk.Widget.exposeevent_cb(IntPtr widget, IntPtr evnt)
at Gtk.Widget.exposeevent_cb(IntPtr , IntPtr )
at Gtk.Adjustment.gtk_adjustment_value_changed(IntPtr )
at Gtk.Adjustment.gtk_adjustment_value_changed(IntPtr )
at Gtk.Adjustment.ChangeValue()
at FSpot.Widgets.IconView.ScrollTo(Int32 cell_num, Boolean center)
at FSpot.Widgets.IconView.ScrollTo(Int32 cell_num)
at MainWindow.JumpTo(Int32 index)
at MainWindow.LoadPreference(System.String key)
at MainWindow.HandleIconViewReady(System.Object sender, System.EventArgs args)
at Gtk.Widget.SizeAllocatedSignalCallback(IntPtr arg0, IntPtr arg1, IntPtr gch)
at Gtk.Widget.SizeAllocatedSignalCallback(IntPtr , IntPtr , IntPtr )
at Gtk.Application.gtk_main()
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at Gnome.Program.Run()
at FSpot.Driver.Main(System.String[] args)

Wednesday, April 8, 2009

USAA Deposit at Home on Linux *It works now!!!*

*update 10/12/11* IT WORKS!!  Thanks to Garrett, and Mr. Brown from USAA, you no longer need to use any special software to trick the website into letting you post your deposits.  A message on the site reads: "Your system does not meet the minimum system requirements. You may choose to continue, but we recommend using a supported system".  No problem, click next and you are on your way.   Thanks for listening, USAA!!


*update* Thanks to Dave for the idea,
*update* Thanks Garrett, see his comment below.  We may all be wise to send USAA a suggestion via the feedback link.  Just remember to be nice.  The last thing we need is for USAA to decide to implement better browser detection to specifically block linux.  Or worse, implement Silverlight.  In the meantime:

Just set your user agent using a firefox addon to:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; sv-SE; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8

If you have trouble adding that user agent, here is what I did after you install the add-on above:
Tools-->User Agent Switcher-->Options-->Options
Useragents-->Add
Description: Firefox Macitosh Intel for USAA (or whatever you want)
Useragent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; sv-SE; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8
OK
OK

Make sure you switch to that user agent before even going to USAA.

And make sure you have the java plugin and you are good to go! Thank you macintosh for having a marketshare to help us linux fools get stuff working. The macintosh java client allows you to simply select pre-scanned checks with your choice of software. Nice!

Note: This assumes you can get your scanner to work in linux which is assuming quite a bit :-)

Sunday, March 29, 2009

sleeping your computer

Sounds easy, right? You go into Power Management and set it to sleep after 30 mins. Done deal. Well what if you've enable fast user switching? Now all-of-a-sudden your computer goes to sleep because your wife is idle on VT8 while you are active on VT7. Dammit!

Here is a work-around: don't use X to sleep the computer. Disable sleep for each profile, then:
apt-get install sleepd
edit /etc/default/sleepd
mine looks like:
PARAMS="-U 1800 -u 1800 -i 22 -i 23 -s \"s2ram -f\""

The default is to hibernate which is silly for a diskless desktop, so I s2ram instead. The interrupts to watch can be discovered by:

watch -n1 cat /proc/interrupts

Now wiggle the mouse and hit keys on the keyboard to discover which interrupts increment when you do that.