MOTD

Message Of The Day

Mon, 14 Mar 2005

05:20 [zork(~/sam/code)] cat hacking-the-guhnome.txt

When in doubt...

...hack it yourself.

Since Warty came out I have become a much more hardcore gui desktop user. I've hacked up quite a few Nautilus Scripts to make my life a little easier, but after "losing" a hard drive on my laptop I'm back to basic Nautilus. Now I've hit an annoying missing feature in it yet again.

Nautilus has this nice context menu that pops up for certain file types and allows to do nice things like add a bunch of files to Rhythmbox, make a tarball, or what have you. What they've never had was a way to make an image your desktop background. I know that this a silly thing to get all crazy about, but it really bugs me that it doesn't support this out of the box.

I used to have a script that would do this for me, but it is kinda annoying to have to right click, wait for the menu, then go to the Scripts menu, and wait for it to come up, and then finally click on "Make this my background." Also since it was attached to the scripts menu it could come up for any filetype which seems a little strange since you could ask the system to make an text file your background. It wouldn't do it of course it just seems like a bit of UI there.

So now here's what I want. I want a context menu for images that says "Change Desktop Background to image..." And then does it. And I would prefer to learn as little as possible about the guts of Gnome and Nautilus in the process. And I don't want to have to do it in C, I'd rather do it in python.

So I whip out google and start to figure out how to do this "simple" task. There seems to be a few python-bonobo tutorials out there, mostly working with making panel applets. Bonobo adds this big maze to some of the Gnome stuff. There are a few tools to manipulate it, but it mostly works like a scary black box. And doesn't appear to like making any log messages at all.

So I start taking apart some apps that use the interface namely file-roller. The nautilus source package also has a pdf that contains some documentation on how to build some interfaces. So I start to learn about bonobo. For instance, did you know that bonobo can be used as a primitive medieval torture device? It's true. Also it has something to do with CORBA which accounts for it's rampant insanity. So I try randomly typing strings into vi and started to get some results. The bonobo query whatnot was telling me that yes it knew about my crazy extension, but nautilus still was not using it.

Why nautilus? Why do you hate me so?

Follows is some of the notes that I was taking:

Try some tricks. ltracing nautilus == crash.

Sure would be nice to find out how nautilus pulls these menu items out
of it's ass.  Apparently it doesn't use the bonobo activation the way we think
it should.  libeel.  More nautilus guts.  Also some eel guts.  Remember to wash
hands.

So in the end it looks like someone decided to extricate all of the bonobo bits out of nautilus. Great. No more bonobo. But now there is no easy python way (at least from what I see) to screw around with nautilus.

I guess sometimes when in doubt just keep doing it the lame crappy way. Ok, back to hacking pgscsh. Hacking the guhnome is too hard today.

03:41 [zork(~/nutella/Waffle)] cat GreeTeaAndCigarettes.txt

And Jesus was a sailor when he walked upon the water...

The recruiters are messing with my head at the moment. My plan for survival is just to push out the applications but to keep the hope level at a bare minimum. Work has its ups and downs. The new manager is actually trying to improve things but they are running into the intertia built up by the rest of management. As I mentioned before they are trying to placate me with a new job title but whenever they use it I am reminded of Andy Griffith being proud of the title "Permanent Latrine Orderly (PLO)" in No Time for Sergeants. I am tempted to try and acquire a Mc Donalds Happy Hat and inscribe it with my new moniker.

I was listening to a show on NPR and they used Take This Waltz as one of the tunes to support the piece. I was jogged into digging into my collection and listened to I'm Your Man for most of the week and then secured a Leonard Cohen compilation from the library.

My viewing has been quite diverse, Jim Jarmusch's Coffee and Cigarettes (what a cast!) and Elf (James Caan?). Zhiwen has also been bringing me some fillums to improve my listening comprehension. I had loaned her 《苏州河》 and she declared it weird and so has loaned me 《绿茶》. This has a similar theme but a completely different style. Still very intriguing. Although Jiang Wen has been in three other films that I have seen I didn't recognise him at all.

Despite my claim in a previous post I haven't been reading Shakespeare. However, while digging in one of my boxes of books I did come across an anthology of John Donne's work and so have been browsing that. "Rave on thy holy fool" indeed.

"...but he himself was broken long before the sky would open..."


[zork(~)] cal
[zork(~)] tree
[zork(~)] syndicate.py
[zork(~)] cat README