TWITTER UPDATES

    follow me on Twitter

    Blog has moved to blog.ometer.com, see March, 2007 on new site

    Blog entries for March, 2007

    HOW TO USE GNOME-KEYRING
    This post moved to http://blog.ometer.com/2007/03/09/how-to-use-gnomekeyring/.

    I was recently trying to use gnome-keyring and ended up having to ask Alex what was going on. Here is a short explanation so anyone else googling the subject might find it.

    The keyring repository maps attribute sets (like {server=yahoo.com,foo=bar}) to secrets. A secret is just a string that gets encrypted, typically it would contain your password or username/login. The (attribute-set,secret) pair is called an "item."

    There's a ton of stuff in gnome-keyring.h. What you want to use is create_item_sync() to create your secret, and find_items() to retrieve it. The "network password" API is just a convenience layer that keeps you from making up your own attribute names.

    If you're using the Python bindings, you have a problem; one of the two functions you want to use, find_items(), just crashes. The example code that comes with gnome-python-desktop jumps through some weird hoops with gconf to work around this; it stores the id of the item in gconf, instead of using find_items(). This example also calls the id "auth_token" as if it were special or secret, but the id is just a handle to the item. This example is totally wrong in a confusing way, is what it comes down to.

    The last thing to know is that there are multiple keyrings, but you only care about two. A NULL keyring means to use the default persistent one, and the string "session" means to use an in-memory keyring that will be dropped on logout. find_items() searches all keyrings, and that's why find_items() has no keyring argument.

    I filed a bug on the python bindings since they aren't really usable without find_items() but it looks like these bindings are unmaintained (the bug got assigned to "Nobody's working on this").

    WHALING
    This post moved to http://blog.ometer.com/2007/03/09/whaling/.

    From publication 526:

    Expenses of Whaling Captains
    Beginning in 2005, you may be able to deduct as a charitable contribution the reasonable and necessary whaling expenses paid during the year in carrying out sanctioned whaling activities. The deduction is limited to $10,000 a year. To claim the deduction, you must be recognized by the Alaska Eskimo Whaling Commission as a whaling captain charged with the responsibility of maintaining and carrying out sanctioned whaling activities.
    Sanctioned whaling activities are subsistence bowhead whale hunting activities conducted under the management plan of the Alaska Eskimo Whaling Commission.
    Whaling expenses include expenses for:
    • Acquiring and maintaining whaling boats, weapons, and gear used in sanctioned whaling activities,
    • Supplying food for the crew and other provisions for carrying out these activities, and
    • Storing and distributing the catch from these activities.

    To deduct these expenses, you will be required to keep records showing the time, place, date, amount, and nature of the expenses.

    It would be awesome to have "whaling weapons" as an itemized deduction.


    RSS