Month: April 2015

Automate Instant Messages with Pidgin and DBus

Despite being an overall fan of KDE, I always preferred the Gnome version of the Instant Messenger, Pidgin. It is really designed for ease of use, it is extensible with incredibly useful plugins, and is available on a ton of platforms. Also, it can be easily configured and you can synchronize the configuration files with no issues, even using OwnCloud or Dropbox.

No surprise then that I would use Pidgin to automate all sorts of tasks. I will send myself a message so I get notified on all my phones, using whatever mechanism I want to use. Pidgin comes with a plethora of protocol plugins. If you need something that isn’t on the list, you can also look for third-party plugins. And you can, of course, write your own. I am doing that as a side project to include small social networking sites that only use a web interface.

One of the advantages of Pidgin is that it is scriptable. You can either write scripts internally (using the plugin mechanism) or you can direct Pidgin from the outside. If you want to call Pidgin methods and make them do things, you use the universal DBus interface.

DBus is universal in that you don’t need a particular environment or programming language to make it work. In fact, DBus was born out of the desire to make different bus interfaces work together. KDE used to have DCOP (which frankly was far superior to DBus). Gnome, if I am not mistaken, used CORBA.

You can send DBus messages using a shell script, or from the command line. DBus comes with utilities that send messages to various interfaces, making it easy to script things.

In my case, I decided to use Python. The Python DBus interface is rock solid and stable, and the language fairly easy to use and parse. If you want to send a message to a DBus object, you simply invoke it.

(more…)

Last Snow in Mammoth

2015-03-31 112728 20150402 2012071608It was so tempting: on the heels of the mega-epic trip around the Rockies, I wanted one last chance to ride before the season’s officially over. Also, I had bought this cheap Arbor board and these cheap Gnu bindings and I wanted to give both a go.

I packed the car and my friend Torrey and we dashed up the highway on a fateful Monday afternoon. The snow divinities liked us, as we sailed up the 15, then 215, then 15, then finally 395 without a hitch. I’ve had the worst experience driving through San Bernardino before: none of that this time.

We got into Mammoth too late to get an idea of snow conditions. The hotel was the Juniper Springs Resort, which has amazing lift access: you stumble out the side door and you are at the lift. It’s really awesome! The room was the usual one bedroom condo, with a spacious and well-equipped kitchen and two TVs. I love to stay there!

In the morning, I looked out. We got a condo on the South side of the building, overlooking the lobby and hence automatically the lift. What do you know, there was no snow. Not a single flake, speck, or puddle. The lift was bone dry, immobile, and our lift access had been revoked by Mother Nature.

(more…)