Thursday, September 14, 2006

Xnest: way too cool

If you are using linux you would know what X is. Well if you don't I suggest you google for xorg and xfree86. Now coming to Xnest, Xnest is both an X client and a server. So what it basically does is create a window on your desktop which acts as an X server to which other applications can connect. What's the use of this one might ask. Well its utility is only limited to imagination. You might run different window managers in different windows on your desktop. This means you can simultaneously run kde and gnome if you can't choose between the two. You can even nest WMs one inside the other.Like this example in which Xnest is running inside fluxbox which is running inside Xnest which is inside fluxbox which is inside Xnest.... Click image to view it in full size. The other use is you can view desktops of other machines without running a vnc server.Here's an example where Im viewing the desktops of three different machines on my system. Click image to view it in full size. Now that you are excited here's how you use this tool, first you need this package xorg-x11-Xnest (I assume you are using xorg not xfree86, there's a different package for xfree86). To start Xnest on your local display and make it the server on display :1 run the following command:

Xnest -ac -geometry 400x300 :1
The geometry option specifies the size of Xnest window, default is 3/4th of the screen. To test if its working use this command:
xterm -display localhost:1
An xterm window should be inside the Xnest window. Well it hasn't been that exciting so far. Now for some fun:
gnome-session --display=localhost:1
You would be running gnome inside another WM. This gets even more exciting. SSH to any other machine and use this command:
gnome-session --display=your-ip:1
Now you have a remote gnome session inside a window. You can run different window managers this way. I leave the rest to your imagination

Update: The site hosting the pics is down so until I find a new web host the page will be broken.

1 comment:

Anonymous said...

gnome-session

Xlib: extension "RANDR" missing on display ":1.0"

feed