Fast User Switching applet

I went yesterday to Zaragoza
to give a couple of talks. In the morning, at the Youth Institute, I had to give a
tutorial on GTK/GNOME programming. Since the people attending already knew a bit about
GTK, I decided to implement the Fast User Switching applet in the talk.
So, we just had time to implement the applet itself, and the ‘New login’ menu item,
but I think it can perfectly be the base for more improvements. As a result of
the talk, a couple of guys were interested in carrying on the development of the
applet, so I assigned them to research on how to communicate with GDM to get
the list of open local sessions and show them up on the menu, so that users
can select them. To actually change the virtual terminal, I guess chvt is the
command to use, or is there a better way?