Subscribe to Make Magazine Today!

Xo-Laptop-X11

The XO laptop continues to be very hackable. If you haven’t ordered one already, you really should because you only have a few days. I’ve owned some pretty sweet devices in the past, but nothing compares to this. At every turn, I find something new and cool about it, and there always seems to be a way to do the things I want to do. The only thing I need to worry about is using up all my flash drive space, but that’s what USB drives are for, I guess.

Because the Sugar interface includes an X11 window manager, you can’t fire up your favorite window manager without killing Sugar… unless you run a nested X11 server. The Xephyr server is available in the XO’s default package repository, and it can run as a client and a server at the same time: as a full-screen client of the XO’s X11 server, and as an X11 server that can contain its own session, window manager and all. (Xephyr is similar to Xnest, but supports more X extensions.)

To get it up and running, I started the Terminal activity, used su to become root, and installed Xephyr and blackbox (a nice lightweight window manager):

$ su
# yum install xorg-x11-server-Xephyr blackbox
Next, exit out of the root shell, and create a file in your home directory called xephyr.xinitrc that launches the window manager of your choice:
# exit
$ echo exec /usr/bin/blackbox > ~/xephyr.xinitrc

Now, each time you want to run Xephyr, use xinit to start up Xephyr on display :1 (if you want to run more than one Xephyr session at once, use :2, then :3, etc):

$ xinit ~/xephyr.xinitrc — /usr/bin/Xephyr :1 -ac -screen 1200×900

You should see your window manager start up; the screenshot above shows blackbox with a few clients running. I ran into a few oddities that will eventually send me running to X11 documentation; for example, arrow-up and arrow-down don’t bring up my history in the bash shell (but Ctrl-P and Ctrl-N work fine). And the screen is pretty hard to read except in reflective mode… but wow, it’s nice to have 1200×900 pixels on such a small screen!!!


  • Andrew Reid

    Absolutely fantastic. Thanks Johnny.

  • Atomic

    I am making a test with this now. I try to make a game where two people can move around and see everything correctly in perspective like that. It has two screens and two controllers. They are then linked to each other…. Currently it is… not working :/ Well I keep doing tests..

  • voxel486

    That is soooooo stinking cool! i have heard of computer screens in the future using web cameras and facial recognition to sense where the user’s eyes are, to do the exact same thing you had shown us.

    Great explanation, too. It was very well thought out and accessible, and made the whole project more understandable.