Wednesday, July 18, 2007

Xnest: Fun with X-Window

So, it turns out that Xnest, in spite of being part of most standard distributions of X-Window, is obscure. Too many people, "I've never heard of that." followed by "Wow, that's pretty cool" so—here's the story.

Xnest is a sort of Janus of the X-Window world. On one face you'd swear is was an X-Server, on the other an X-Client. So why is that useful? Consider: I want to run a Gnome desktop session from a remote box but I already have a window manager running locally. Enter Xnest. If I run Xnest on the remote machine, through SSH, that machine believes it is running an X-Server, my local machine is of the opinion that is running an X-Client. What I see is an X root window. Invoke it like this:

Xnest -geometry 1150x750 :1; xterm -display :1

First fire up the Xnest application, then an xterm so we can use it, then, in the xterm, type gnome-session... BLAM, cool.

Of course, "man Xnest" is your friend, read up on other options. Just thought you'd like to know, if you didn't.

Labels: , ,

2 Comments:

Blogger BJT said...

I knew about xnest! I bumped into it one time while trying Debian. It was right there in the Gnome menu!

Anyway, it's mega useful, or at least entertaining.

Fri Oct 19, 03:42:00 PM EDT  
Anonymous simcop2387 said...

also if you don't want to run an xterm also, you can do something like this (shell dependent)

export DISPLAY=:1
gnome-session

simcop2387

Tue Jan 08, 01:12:00 PM EST  

Post a Comment

Links to this post:

Create a Link

<< Home