A true test of Ubuntu: Setting it up for the parents in 2 hours

So yesterday I got a desperate call from the folks — Windows got gunked with adware, viruses and other forms of badness and dad couldn’t use it to work from home anymore. So, after work i got on a train and headed back to the ‘rents for some quality computer troubleshooting family time.

My instinct is usually to throw such a computer out the window and start over from scratch with a more…. Free… Operating system. I gave a go at cleaning it anyway and spent 30 minutes playing the usual hide and seek game with the malware. I got rid of most of it, including all the annoying popups, but things like control panel applets still wouldn’t open. I also got the worst headache of my life and wanted to shoot myself in the foot.

So I decided to go with what my gut told me from the getgo. Whipped out a usb key, backed up the important data, pulled out he livecd and got ready to start from scratch.

Lets see just what we’re getting into:

  • Mom has an iPhone. She likes to buy music on iTunes and must have her contacts, music and photos synced with the desktop.
  • Mom also needs Google Chrome as thats what she has used to get her aol mail for years.
  • Dad has a blackberry. He just wants everything, including contacts, backed up and his phone to charge over usb.
  • Both mom and dad need to be able to print and scan from the big HP multiwhatever thing that’s on their desk.

Install worked wonderfully. It’s quiet satisfying to tell the partitioning tool to “use the whole disk and wipe out any old operating systems”. 15 minutes later we’re in the desktop and I start the install, configure, google for help cycle.

Chrome is easy, a one click install and IO can drag the icon to the desktop for high”findability”.

Next, printing. This was completely automatic and ‘just worked’ out of the box. Awesome.

Next, iPhone. I hate these things. Anyway, first thought was to plug it in then try rhythm box. No dice. A quick google turns up that the device first needs to be unlocked before i can plug it in. Easy enough. Plugged it in again and now RB shows the phone, nice. I select all the files on the phone and drag them to the ‘music’ folder, it starts copying. Cool. I do the same thing to see what happens, and i get an endless cycle of popup dialogs asking me about overwriting files. Not good. Bug filed for poor User Experience.

F-spot also automatically showed up and offered to backup all the photos. Worked perfectly.

Ok, mom taken care of, blackberry time. Some quick googling found me this barrysync thing, which seemed simple enough. A quick apt-get later and ive got a really dinky looking app sitting on my screen which says no devices found, bummer. I did a bunch of googling, no dice. In desperation i went for the windows option — a reboot. Upon return to the land of the living the app actually found the device! Click ‘backup’ and 15 seconds later everything is backed up. I think.

All in all Ubuntu was able to meet the needs of my parents on day one with virtually no pain or terminal work whatsoever.  We’ll see how long they stay happy.

GUADEC 2010 debrief

I’m on the subway in ny , heading home from GUADEC in The Hague, n
Netherlands. First things first — a huge thank you to the gnome foundation for helping sponsor my attendance, and to all the conference’s fantastic sponsors.

Some highlights:
-Produced a introspection->docbook documentation generator which is in a branch on gobject introspection, potentially replacing the gtkdoc c scanner.
-Keyword argument support in pygobject is en route.
-Gnome Shell looks awesome
-People seemed interested in general in introspection, which is fantastic.
-‘Super Platforms’ seemed to steal the show. Technologies like DBus and Telepathy are, rightfully, the talk of the town and people are doing awesome things with them.
-Some hackers are weird, others are some of the smartest people I’ve ever met.
-LOTS of N900s… Although people in general were not as excited about N900/Maemo/Meego as I would’ve expected. Somewhat contradictory there, the ubiquity of both the device and at the same time the dislike of the device. Or perhaps the two just go hand in hand.

Some lowlights:

-I really did not enjoy the ‘anti-canonical’ vibe I got throughout the conference. I felt people were more upset at Canonical than KDE or Microsoft, which is weird for a Gnome summit. Less negativity across the board would be nice.

-Europe is far away, perhaps I’ll find a way to make it to the Boston summit, a bit closer!

-Everybody seems to be falling in love with the web, which is nice, but I don’t believe that javascript will come to dominate the desktop — simply because devs like to chose their language (and many will not chose javascript if given the choice, myself included).

All in all GUADEC was a ton of fun and very educational for me. It’s also nice to network with some of the really famous people in this space who have done things like write pulseaudio (<3 Lenhart) or the Shell (Colin's mom).

Cheers!

Making wifi work for an Asus 1201T (realtek 8192)

I have been debugging lately with Matt Price over on Launchpad an issue with a machine using the r8192se driver would periodically crash with a kernel panic.  We have narrowed it down to an ioctl which is most commonly run by the command “iwpriv”.  A quick fix hack is to just entirely neuter the iwpriv command.

1) sudo mv /sbin/iwpriv /sbin/iwpriv.old
2) sudo echo ‘#!/bin/bash’ > /sbin/iwpriv
3) sudo chmod +x /sbin/iwpriv

You can read more about the fix and our work to uncover the bug on the bug report.

Sync Multiple Calendars on the Nokia N900

I recently moved to a different corporate infrastructure (you can guess from where to where by reading a bit about the company I work for, Invite Media :)) and decided that I was going to be serious about using the calendar on my Nokia N900.  I had the following “desires”:

The Problem:

  • Work and Pleasure should be separate.    I want my work stuff on my corporate google calendar and I want my personal apts and reminders on my personal google calendar.  No mixing.
  • I want both to sync to the phone at a reasonable interval and not screw up either calendar or cross events from one to the other etc.
  • I would like to not pay anything to accomplish this.

I noticed something really quickly:

Stock Maemo 5 cannot support syncing calendar etc. with more than one Mail For Exchange account.

That sucks.  Oh well, the Maemo-ians must’ve run out of time and had to cut scope on the built in MFE syncing.  Worse things have happened in the world.

My Solution (Update: This may not be the best way to do it.  As is pointed out in the comments another application, Erming, exists which purports to be able to solve this problem.    I’m going to test it soon.)

  • TWO goosync accounts.  I ended up paying for one and using the free service for the second.  I may sadly have to end up paying for both.  (This really stinks :().  I used goosync because it does a very good job of exposing google calendar as a SyncML service.  I couldn’t find anything comparable to this on the web.  The reason you need two accounts is that, even though Goosync supports syncing multiple calendars, all the calendars have to come from the same google login.  I have two in this case.  Although, now that I am typing this, I realize I could just share one calendar with the other account and sync them that way.  That would mean that both calendars show up as the same color and mix on the device though, which would be suboptimal.  If thats OK with you that might be one route.
  • Syncevolution (in extras-testing) on the device to sync with the two different goosync accounts.  I setup each goosync account to use a different Maemo 5 calendar so they appear differently and I can create new events and chose which calendar they go to (very nice!)
  • Syncevolution by default does not provide more than a once daily sync.  Thankfully the Maemo 5 incarnation of syncevolution is really just a UI ontop of an underlying command line client, so we can use the command line client to trigger a sync whenever we want.  I used alarmd (available in extras-devel) to do this.  I used a tip from here: http://www.estamos.de/blog/2009/05/08/running-syncevolution-as-cron-job/ to setup the alarm command.  To save you the jump its:
    • env `dbus-launch` sh -c ‘trap “kill $DBUS_SESSION_BUS_PID” EXIT; syncevolution <NAME_OF_SYNCEVOLUTION_ACCOUNT>’
    • I setup two alarms, one for each goosync account to run every hour and it has been working flawlessly for more than a week now!  If you pay for goosync you can probably use this for tasks and notes as well (I havn’t tested this yet)

UPDATE: 
  1. I had no idea that I was syndicated on planet Maemo for my #Maemo posts.  Cool.
  2. Apparently there is another application which I had overlooked, Erming-NG.  It purports to be able to sync directly with multiple Google Calendars.  I will investigate this further!  
  3. I swapped N900s and had trouble resetting up Goosync.  I tried out erming and it worked flawlessly without any middle man in connecting to my various Google calendars — the only problem is that I couldn’t get it to sync more than once per day (and the connection needs to already be active for the sync, it wont auto-connect to wifi or 3g for its sync.  It actually throws obnoxious errors if its not connected).

Back from France

Salut mes amis!

I’m rather tempted to write this in French; given that for the past two weeks I have been travelling around “Ce Beau Pays”.

Since you’re not really interested in what I did in France (touring with my girlfriend mostly) I’ll instead update on some more relevant things:

  • The startup company I’ve been devoting my life to these past 18 months, invitemedia, was just acquired by a small company in California you might have heard of: Google.
  • I had previously had an offer to work at Google as an Associate Product Manager (APM).
  • In short: I work now for Google as part of Invite Media, and will continue to work for Google in the future. Where and under which program is TBD.
  • I will be attending Guadec 2010 in The Hague, Netherlands!
  • I am submitting two proposals for lightning talks at Guadec.
  • Zhaan version 0.5.1 is now in Extras-Testing, waiting for your QA-ing pleasure!
  • I am moving to NYC and still looking for apartments on the west side.

I am going to spend this weekend unpacking and continuing to figure out short term things in life, like where I will be living come July.  Zhaan work, Pygi work and lightning talk proposals will.

A UPnP Home, Step 2

Part 1.  Ordering a hardware UPnP-AV Renderer

The Vera I ordered in “A UPnP Home” was to act as a bridge between UPnP and appliances around the house.  This still left my AV needs somewhat unfulfilled as most UPnP capable devices are UPnP consumers, but do not offer themselves up as fully fledged renderers (AVTransports).  For example, the PS3 can find my Rygel mediaserver and play content from it but I cannot control the PS3 with Zhaan.  Only the PS3 can control the PS3 (lame).

I’ve been looking for a real UPnP mediarenderer for a while now, and finally pulled the trigger on one the other day.  The most common device in this market is the “Popcorn Hour 100”.  There is another version, called the eGreat EG-M34a which is what I purchased   Its the same hardware just in a different package.  It calls itself a “Network Media Tank”, which seemed a bit odd but sure, I’ll go wit hit.  It promised to be controllable remotely via UPnP and also boasts support for every format known to man.

Part 2.  Testing out the Network Media Tank

I plugged in the NMT with an HDMI cable to my TV, plugged in the ethernet and power, switched to HDMI input and…. nada.  I pulled open my handy dandy GUPnP universal control point and low and behold the NMT shows up on the network.   I told it to start playing some music and whoosh, my TV came to life.  (I have to wonder how other people get started with this thing, those without their own control points).  Once the thing turned on it did eventually show me a UI on the TV for browsing my media shares.

So thats the good news, I can start playing music via UPnP.  The eGreat NMT does the most basic thing we need from a renderer, cool.  But how does it fare in responding to the rest of the UPnP spec?  Answer: really, really poorly.  Here are a list of problems I have found so far which inhibit this NMT from being a “good” UPnP renderer

  • The “Pause” action is mysteriously missing from the UPnP device description and the NMT does not respond when a Pause is sent.  Pausing via the remote works fine.  I guess I could hack around this by noting the current time when the user hits pause, send a Stop(), then when the user hits Resume I could hit Play and then Seek.  That is really lame though.
  • The GetPositionInfo() command always returns a CurrentURIMetaData with Title, Artist and Album being “Unknown”.
  • GetPositionInfo()  always returns a song length of 00:00 making it impossible to draw a progress bar.
  • There is no RenderingContorl service so no UPnP volume control.

The good news is these are all very easy issues to fix in software.  My hunch is this whole thing is Linux based, so I am hoping the source code will turn up someplace and I’ll be able to hack in these features and load up some custom firmware.

Part 3.  Testing the Vera / Home appliance automation

The vera was an interesting case.  You can tell this is a startup — plain white box with no branding, the box itself is all white and the Vera logo is clearly a sticker somebody put on by hand.  I’m not one to nitpick based on aethestics though, so I plugged it in and booted it up.  My experience:

  • The instructions say to try and go to 192.168.81.1 which didn’t work
  • I found, via UPnP multicast, that the device was 192.168.1.111 (I could’ve also asked my router’s dhcp table to find it).
  • Going to the device via the browser (at 1.111) worked perfectly.  I got nice totally unhelpful video tutorials.
  • Most of the online documentation for Z-Wave device additions is old and outdated.  I guessed at how to add a new z-wave device (by holding the z-wave button on the vera and on the new device) and got lucky and the appliance showed up.
  • GUPnP control point noticed a new device under the Vera device, with a SetTarget() function.
  • SetTarget() was able to successfully enable and disable my lights!

From here I will probably build some kind of Maemo application which will either just change Scenes in the vera (the vera is capable of storing appliance configuration in prepackaged scenes which can be switched between) or I might even just build a UI around SetTarget()).  Either way — Vera works perfectly (after some rough edges).

Conclusion So Far:

The jury is still out on finding a good, cheap UPnP-AV Media Renderer.  The eGreat is OK, but has some serious UPnP software deficiencies.  The Vera looks like it will solve all of my UPnP/Appliance needs though.  Overall I am happy for now, and am excited to hack together some Maemo apps to work with the Vera and to try and find software workarounds via Zhaan to make my eGreat more usable.

p.s. I had a pretty terrible sinus headache when writing this article, so I apologize if my prose is less exciting and more grammatically terrible than usual.

PyGI 0.5.1 Released

Hello,

About 3 weeks have passed since the initial release of PyGI.  Since
then we have seen a significant bump in activity in #pygi and also
several new contributors.  A big thanks to John (J5) Palmieri for his
continued efforts to test PyGI with his applications and drive
development forward, as well as Tomeu Vizoso for his hard work and
John Dahlin for his continued support and patch reviews.

Major pieces of this release include the refactoring of the invoke
method (which needed it badly) as well as new overrides, a bunch of
callback support fixes and union support.  Shortlog is attached below
for more.  Python 3 support is still in the works and should land
soon.

PyGi 0.5.1 : http://ftp.gnome.org/Public/gnome/sources/pygi/0.5/pygi-0.5.1.tar.gz

You can find the PyGi website/wiki:

http://live.gnome.org/PyGI

And the public git repo at:

git://git.gnome.org/pygi

Bug tracking is done in project pygi on bugzilla.gnome.org.

Cheers,
-Zach

John (J5) Palmieri (4):
make __all__ be a list of strings, fix override mechanism to use
it correctly
Add the Gtk.Builder override
override Gdk.Drawable to add cairo_create convinience method
wrap GObject module so we can go through GI when requesting attrs

Simon van der Linden (1):
Bump required GLib version to 2.22

Tomeu Vizoso (15):
Add support for enums without GType
Rename variable with a very generic name
Print any error messages raised inside _pygi_closure_handle
Refactor get_* methods in the *Info wrappers
Add basic support for unions
Dont force subclasses to implement all virtual methods of their bases
One more step at refactoring _wrap_g_function_info_invoke
Add override for Gdk.Color
Fix GAsyncReadyCallback
Move invocation code to its own file
Fix passing GDestroyNotify
Only hookup vfunc implementations for locally-defined methods
Avoid freeing garbage
Fix passing callbacks as constructor args
Fix overrides.Gdk.Color.__new__ args

Zach Goldberg (7):
Bump version during development to 0.5.1
Refactor implementation of scope call to allow for multiple
calls during lifetime of function invocation.
Change SCOPE_TYPE_INVALID handling to be a warning and not an error
Force out arguments to be initialized as NULL.  Comes with a test.
Change SCOPE_TYPE_INVALID handling to be a more verbose error.
Correct the reference counting of userdata in closure handling
Step 1 of refactoring _wrap_g_function_info_invoke

A UPnP Home

Since Zhaan made it into extras-devel I have gotten several feature requests for new functionality.  Many of them have made sense and I have gone ahead implemented them in the latest version.  For example, Zhaan 0.1-8 implements vastly improved playlist support.  Zhaan is now at the point where I have found myself actually using it enough to entirely replace my standard Sonos controller and actually ENJOY the experience.  (I also installed Zhaan on my ‘stable’ N900, not just my development device, and have witnessed no ill effects.  I think it’s probably safe for anybody to use at this point)

Since (in my opinion anyway) I have succeeded at building an application to solve in-home media problems with UPnP I now turn to other problems that UPnP can solve (since it’s so much fun to hack around with).  Zeeshan Ali wrote a GUPnP-light application which shows an image of a lightbulb which goes “on” and “off” based on another test control point application. That seems like an interesting idea, using UPnP to control my lights.  And why not, right?  Who really wants to get out of bed at night to turn off the wall-mount light switch when my phone is on my night stand within arms reach and could be used to control those lights.  (clappers be damned).

Herein lies a rather common problem in computer science.  Writing software to do fun things in simulations is easy.  Applying it to solve real world problems by designing, manufacturing, marketing and selling a real physical product is hard.  Thus for the first 2 days of my search I could not find any devices to allow me to control my lights via UPnP.

During the first two days of searching I did learn a lot.  Here is a quick summary/FAQ of how modern “Smart Homes” work: (Smart meaning networked and remotely controllable)

  • Smart devices in the home do not often connect to the WLAN, let alone expose themselves as UPnP devices.
  • Instead, they use mesh networking.
  • There are several common mesh network protocols.   Z-Wave, X10, Insteon to name a few.
  • Once you deploy a bunch of Z-Wave (or other) mesh devices you need to deploy a “base station” of sorts which can control all of the devices and which MAY connect/bridge to the LAN.
  • Most base stations come with their own software to interact with via a browser or other proprietary mechanism.

Last night at about 3AM, on the verge of giving up my search, I found micasaverde.com.  They have a device, called the Vera, which looks to do exactly what I want!  I posted a quick question on their forums confirming that the device does what I had hoped (exposing each Z-Wave device as its own UPnP discoverable device). Turns out it does!   Here is a response from Javier, an “administrator” of the micasaverde forums.

Yep, that’s the main point.

Every device attached to Vera gets a full UPnP description and identification. Even for internal programming, everything is done using UPnP references.

In fact, writing device plugins (to get new devices attached to Vera) is mostly writing Lua code to join UPnP actions and state variables with the real-world device control interface.

To boot it looks like Vera is low power and designed for energy savings.  It also runs on a (mostly, from what I can tell) open source Linux stack.  Rock on!

Looks like I’ll be getting myself a Vera for my birthday (next week) and, with any luck, a week or two later posting another application to Maemo extras-devel that can control Z-Wave devices via a Vera!

Update: Turns out you can SSH into your Vera too.  I’m starting to build a collection of embedded Linux/OpenSSH servers around my house 🙂 (Chumby, Vera, N900 etc.)

Zhaan now available in extras-devel!

Myself and the PyMaemo folks have been working these past few days to clear the blockers from making PyGi work on maemo.   There was a last minute bug in the Maemo autobuilder which prevented PyGi from properly being imported into the maemo extras repository.  (Turns out the bug was caused by the fact that the PyGi package’s version number had capital letters in it.  Thanks X-Fade for your help!).  The bug has now been cleared and all of PyGi and Zhaan have been imported successfully.

For any users: Zhaan should be installable in the multimedia category of your application manager.  Please give installing and using it a shot and report any bugs you find (in the maemo.org BugZilla)!  Positive feedback and/or feature ideas is also appreciated!

PyGi version 0.5, the ‘Watch out, theres a Volcano!’ release

(Special note for this version of the release statement on this blog — All the features Zhaan needed made it into the release, hence Zhaan is 100% compatible with PyGi 0.5)

It is my pleasure to bring to the world the first release of PyGi –
the Python GObject Introspection bindings – version 0.5. We chose the
number 0.5 to indicate that we believe PyGi to be of beta quality. We
want to encourage the brave souls of the world to try it out and help
us by reporting any bugs that are found.

PyGi is nearly feature complete. A highly condensed list of features:

– Implements in and out arguments of all types
– Implements closures, callbacks and virtual functions
– Implements wrapping of structs, objects and interfaces.

A huge thank you is due to several people for making this happen.

– Simon van der Linden, for all of his hard work on PyBank/PyGi.
– Tomeu Vizoso for all of his hard work on PyGi throughout the past
months/years
– John (J5) Palmieri, Colin Walters, Johan Dahlin and others for
assistance, contributions and help along the way,
– All of the great folks who participated in the Gnome/Python 2010
hackfest who made this release possible (including generous support
from Red Hat, Canonical and OLPC)

Version 0.6 of PyGI is likely to include:
– Python 3.1 support (already 95% working! Thanks David Malcom and
John Ehresman!)
– A major refactoring of some of the thickest parts of the code
– Much improved documentation
– Improved compatibility with older bindings

PyGi 0.5 is available for download here:

http://ftp.gnome.org/Public/gnome/sources/pygi/0.5/pygi-0.5.tar.gz

You can find the PyGi website/wiki:

http://live.gnome.org/PyGI

And the public git repo at:

git://git.gnome.org/pygi

Bug tracking is done in project pygi on bugzilla.gnome.org.

Cheers,
-Zach Goldberg

PyGi Maintainers:
Simon van der Linden
Tomeu Vizoso
Zach Goldberg

Git Shortlog:

Alex Dedul (1):
Search for python-config-${VERSION} when python${VERSION}-config
is not found

Anderson Lizardo (1):
Depend on GLib 2.20 rather than 2.22

Colin Walters (2):
[Makefile.am] Clean up CFLAGS handling, don’t override all: target
Add Tomeu’s prototype script for converting pygtk to pygi

Johan Dahlin (3):
Create overridden modules in two passes
Remove trailing whitespace
Pythonify. Avoid ; and () around if statements

John (J5) Palmieri (1):
override that wasn’t checked in – fixes some test cases

Olav Vitters (1):
Fix doap file

Simon van der Linden (18):
Initial import
Add PyGObject patches
Add a doap file
Update PyGObject patches
Remove PyGObject patches since they’ve been merged to master
Fix silent rules setup
Import pygtk properly to avoid failure on some setups
Use the right variable when looking up in sys.modules
Fix members initialization in metaclasses
Remove global checks for pointers and move them in type cases
that need them
sys.path must be modified after pygtk is imported
Suppress compilation warnings
Don’t set a default constructor for structures.
Initialize struct fields to 0 when allocating
Restore the overrides support
Remove support for pointers to basic types as input-only
argument and return value
Fix and complete overrides tests
Add modelines and copyright information to overrides modules

Tomeu Vizoso (28):
Add myself to pygi.doap
Treat GI_INFO_TYPE_INTERFACE same as GI_INFO_TYPE_OBJECT
Register interfaces
Add support for Any arguments
Add stuff to .gitignore
Accept 0 as a valid value for flag and enum arguments
Structs in arrays are not marshalled correctly
A few tests about interfaces
Use the limit constants from glib and interpret G_MAXUINT32 as
PyLong_FromLongLong
Revert “Use the limit constants from glib and interpret
G_MAXUINT32 as PyLong_FromLongLong”
Set a default constructor for boxed structs that don’t have one
Use the limit constants from glib and interpret G_MAXUINT32 as
PyLong_FromLongLong
The array field ‘length’ starts to count from the C arg list, so
need to decrement when it’s a method
Add Gtk.keysyms to overrides
Always create the .so link
Use GIMarshallingTests (old TestGI) in gobject-introspection
Add metadata to the .doap file
Add gdb and valgrind variants for the tests
Allow creating structs with pointers
Add support for foreign structs
Add examples/cairo-demo.py
Require PyCairo
Update to latest version of the pygi-convert.sh script
Implement vfuncs.
Add missing file to tarballs
Add one more missing file to tarballs
Add more stuff to the tarballs
One more missing file…

Zach Goldberg (6):
Implementation callback support with scoping and basic argument support.
Add Zach Goldberg as a pygi maintainer
Move some tests from test_gi to test_everything
Implement nullable argument support, including tests
Fix a typo in pygi-callbacks.c header
Bump version for release 0.5.0