Toying with gadgets

So today, I decided to play around with pygtkmozembed to see how hard it would be to support Google Gadgets on Firefox/Linux. Personally, I am less interested in the random crack gadgets so much as the my data please gadgets.

Now for the most part, gadgets are just packaged iframes with some extra goo (configurable parameters, translations, javascript utility functions) included. Once I figured out how to prevent gtkmozembed from segfaulting, getting things going was fairly easy, modulo the 2 hours I spent staring at Wireshark HTTP traces debugging why the wrong cookies were being sent, when in fact I was copying cookies from my stale firefox development profile…grrr.

Google widgets hack

The current state of things is that any gadget which is a “url” widget (i.e. no extra goo) obviously works; all you need is to have Firefox pointed at the url with the correct cookies from your main browser profile (This latter point I’m still working on doing more robustly). Most other gadgets which are hosted externally we can just point at, which basically returns us pre-rendered HTML. What isn’t supported – and this was actually my main goal – is gadgets which depend on some sort of internal Google gadget authentication like reader and docs. I might see if I can figure out how to compute __ENV_google_apps_auth_path.

One other thing I wanted to mention is the new Files stock for the online desktop sidebar. Basically it started out as a monitor of your recently used files, then Marina added support for pulling in your recently modified Google Docs using the brand new Docs API.

Files stock

I think longer term I want to just add support for Google Widgets to Jackfield, once I add the patch to use the workaround for gtkmozembed so Jackfield doesn’t segfault too.

Update: Turns out __ENV_google_apps_auth_path is used to differentiate between gadgets for regular consumer Google and Google Apps For Your Domain; replacing it out makes it show consumer Docs, whereas replacing it with say a/ shows my docs. Cool.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s