Run a nested X11 desktop on the XO Laptop

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 1200x900

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 1200x900 pixels on such a small screen!!!


Recent Entries

Comments

Oldest comments listed first.

Posted by: Motoma on December 27, 2007 at 7:45 AM

Fantastic tip!


Posted by: thanks on December 28, 2007 at 3:33 PM

...add "-dpi 200" to the command line and it becomes much more readable.


Posted by: Ed on December 28, 2007 at 9:35 PM

From

bash-3.2# yum install xorg-xll-server-Xephyr

I get some messages ending with

No package xorg-xll-server-Xephyr available.
Nothing to do

Do I need somehow to make yum look in another repository? blackbox seems to have installed fine.


Posted by: Ed on December 28, 2007 at 10:26 PM

OK I think I have to edit file
/etc/yum.repos.d/olpc-koji-ship2.repo
to remove the line
[olpc_koji-ship2]
&/or uncomment a baseurl line; I'll try these tomorrow...


Posted by: Brian Jepson on December 29, 2007 at 8:49 AM

Hi Ed,

That should be xorg-x11-server-Xephyr... two ones, not two lowercase Ls. Sorry I didn't point that out in the post--it's even more of an issue for us because of the difficulty in cutting and pasting into the Terminal activity.

If you don't want to retype stuff, check out this tip: http://blog.makezine.com/archive/2007/12/copy_and_paste_sort_of_into_th.html
- Brian


Posted by: N. Holzschuch on December 29, 2007 at 2:05 PM

Great tip!
In my case (YMAMV) "yum install Xephyr" worked.

It's the best way to make multi-window programs (such as aMSN) work on the XO.


Posted by: Ed on January 1, 2008 at 9:36 AM

Hi Brian,

It works fine for me when I type what you wrote. Thanks for a good tip.

- Ed


Posted by: John on January 6, 2008 at 11:09 AM

It appears that the arrow keys to the left of the screen steal the functionality of the actual arrow keys on the keyboard when blackbox is loaded. How exactly would one either tell X to look for two keyboards or tell it to ignore the first one it finds (since this appears to be the "on-screen" keyboard)?


Posted by: -Sparky on January 13, 2008 at 12:21 PM

It is up running on the XO. I can toggle
between XO activities, but I cannot get
them to appear in windows on the Xephyr
screen all at once like your screen shot. The only window I get is the
terminal screen. Totally new with this
window manager. Any help would be nice.
The man pages don't get this basic.


Posted by: Brian Jepson on January 13, 2008 at 2:58 PM

Hi Sparky, unfortunately, activities won't show up on the X11 desktop, but you can start applications in one of two ways:

1) Type the name at the terminal prompt followed by & and press enter, as in:

xeyes &

2) right-click on the desktop and choose a program from the menu. The menu has entries for programs that are not installed (such as Star Office), so this may be hit and miss.

- Brian


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television
Holiday Gift Guides from MAKE
Gifts for Dads
Science and Chemistry
Gifts Under $20
More guides: Santa Claus Machines, Geek Toys for Grown Up Girls & Boys


Check out all of the episodes of Make: television

Alex Rider Dream Gadget Contest
Make: Science Room

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter




    Maker SHED

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Subscribe to MAKE Magazine!

    Make: Online authors!

    Gareth BranwynGareth Branwyn
    Senior Editor


    Phillip TorronePhillip Torrone
    Senior Editor
    | AIM | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Current Podcast

    itunesdl.gif Weekend Project: Beetlebot Simple robot from your parts bin that avoids obstacles. Thanks go to Jerome Demers for the original article in MAKE, Volume 12. To download the Beetlebot video, click here or subscribe in iTunes. Check out the complete Beetlebot article... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog