Tag Archives: terminal

Quick notes on the OLPC XO Terminal Activity

Originally published on joviko-olpc.blogspot.com January 6, 2008.

Well, I’ve realized that to really figure out what I did right / wrong to get DOSBox sound working on the XO, I’ll need to reimage the OS and start from scratch, and I’m finding all kinds of things to do to avoid going down that road just yet.

One of them is looking at the Terminal Activity as part of my process for learning how to create a good Sugar-friendly Activity. Plus I’m hoping that it might be something that I can hack into the “Sugar wrapper” that can be used to run non-Sugar-ized apps as Activities on the XO without having to put Sugar hooks into their internals. In other words, an Activity that launches from the Sugar “Activity launcher” screen, displays an icon in the “active Activity ring”, runs the non-Sugar app, then tells Sugar to remove the icon from the “ring” when the app exits. This would be very handy for Activity-izing apps like DOSBox and other emulators. And thus for running old freeware DOS and Apple programs on the XO.

Anyway, the Terminal Activity is pretty neat. The source code is very short, consisting of about 200 lines of Python. It uses a Python library called ‘vte’ to do all of the heavy lifting. ‘vte’ is, to put it mildly, a bit underdocumented. ‘vte’ is essentially a Python wrapper around the Gnome VTE widget.

So, to help others who might be curious about how the Terminal Activity does its thing, here are some handy links:

The Terminal Activity source code

earobinson’s example Python vte.Terminal window
He ordered a G1G1 XO in November, so maybe we’ll hear more from him…

The magic of Google code search lets us browse the vte source files
Of particular note: The “README” file, the “python” directory (and “python/vte-demo.py” in particular), and the sparsely populated “doc” directory.

The Gnome VTE Reference Manual
Not as useful as I had hoped, but does list out the API.

Happy hacking.