weblog d’un abbe

20070801

Wanna run a nested X server

Filed under: Hacking — abbe @ 2126

Running a nested X server Xephyr in Fedora 7 is so easy. Follow the following steps:

  1. Install xorg-x11-server-Xephyr package from Fedora repositories using yum install xorg-x11-server-Xephyr command
  2. Start 2 instances of terminal (e.g. xterm) in already running X server.
  3. In 1st instance of terminal, execute xwininfo |fgrep "Window id".
  4. Now with the crosshair cursor, select 2nd instance of the terminal.
  5. Note on the window id which prints on the 1st terminal. e.g. 0x4c00022 is the Window ID from following output:
    xwininfo: Window id: 0x4c00022 "wahjava@chatteau:~"
  6. Now in 1st instance of terminal, execute Xephyr -parent 0x4c00022 -ac :1 &.
  7. Now to run gedit in new Xephyr X server, execute following in 1st instance of terminal:
    [wahjava@chatteau ~]$ DISPLAY=:1 metacity&
    [5] 6365
    [wahjava@chatteau ~]$ DISPLAY=:1 gedit&
    [6] 6366
  8. So if there is anything you wanted to execute in this Xephyr X server, you’ve to make sure that you’ve DISPLAY=:1 environment variable set.
  9. When done playing with your Xephyr X server, do killall Xephyr.
  10. Back in 2nd terminal instance :)

Some screenshots:

xterm before starting Xephyr xterm after starting Xephyr gedit + metacity running in Xephyr in xterm

This might not be a recommended way to run Xephyr. So don’t complain, anyways Happy Xephyring… :-D

About these ads

2 Comments »

  1. Hello,
    There is a package called Xnest which does the same thing. If on debian, do

    #apt-get install xnest

    then run the following command:

    #Xnest -query 127.0.0.1 :2

    This will bring up a nested desktop. You will have to enable Xdcmp for this which can be easily done using

    #gdmsetup

    Im not sure this is what you are looking for.

    Thanks,
    Pranith.

    Comment by Pranith — 20070824 @ 1335

  2. Well, thanks for the above information, but I already know about Xnest.

    — begin excerpt —
    Unlike Xnest it supports modern X extensions (even if host server
    doesn’t) such as Composite, Damage, randr etc. It uses SHM Images and
    shadow framebuffer updates to provide good performance.
    — end excerpt —

    Above is an excerpt from http://en.wikipedia.org/wiki/Xephyr .

    Comment by आशीष शुक्ल — 20070824 @ 1438


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: