Multi-pointer Remote Desktop
Posted by Chris Ball Mon, 26 Jan 2009 05:10:00 GMT
Remote desktop is a pretty useful technology. It would be more useful if it wasn't so competitive, though; when someone joins, the sharer has to sit back and watch, or fight over who gets control. Well, now it's cooperative — here's a video demo:
Download the video (23M)
I should make it clear that I'm responsible only for the smallest piece of this work. Peter Hutterer's MPX is the core technology enabling an X desktop to have more than one pointer and keyboard present on it, and my work was modifying the Vino VNC server to make it understand how MPX works. As shown in the video, this requires no modifications to VNC clients — each client can become another pointer on your X desktop regardless of whether it's running on a Windows, Mac or other Unix machine, which I think makes the whole thing pretty compelling.
My patches against Vino are here, and this is a complete summary of them: for each new client that joins, we create a new keyboard/pointer pair and store its details with that client, then when new events come in for a client we send them through to the appropriate device. That's all. This is still prototype code, so there are bugs, the most noticeable of which is when you have more than one client connected, each client can only see the pointer of themselves and the server, although the server can see everyone's pointer; this will be fixed by having vino_cursor_update_timeout() and parents act on a list of cursor positions rather than a single one. (Ideally, GDK should become aware of multiple pointers, too.)
The next steps are to fix some bugs and get the code upstream into the main Vino repository, so that it's ready for when the distros start shipping a multi-pointer X server — one way to do this would be to have Vino's preferences check to see whether your X server supports MPX, and ask you to choose between sharing your main pointer or granting extra pointers to new clients if it does.
The original motivation for this work, besides it being a useful-sounding idea in general, was as an experiment for a collaboration model for OLPC. A very intuitive way for writing collaborative applications would be to make programs that don't have to understand anything about networking, but do have the idea that there's going to be more than one pointer and keyboard around sometimes and that they should be treated differently, just like when using a games console with multiple controllers.
For example: to write a collaborative text editor using this model, you'd want to color the text written by each participant's keyboard differently, but other than that you don't need to care about any details of networking. (You'd want an out-of-band way for each participant to get a copy of the file they were working on afterwards, though...)
I'd be interested to hear any other use cases people could imagine. If you want to give this a try, you need an MPX-enabled X server (which you can get from Xorg Jhbuild) and window manager (such as compiz), and you'll need to apply my Vino patches. Enjoy.
