projectz

Tech, Gadgets, Photography, Social Media and Poor Spelling

Xnest is a great tool to simultaniously use multiple window managers

http://matto.home.xs4all.nl/xnest.html


Xnest lets you start multiple (nested) X-sessions on the same box simultaniously. This provides great fun, and sometimes can even be very usefull. Every Linux user should have tried it!

Things you might want to do with Xnest:

  • You are running ratpoison, a very good windowmanager, and need to do something which ratpoison is not good at (playing with gimp). With xnest you can open a new screen, start a new windowmanager in that and do what you have to do, while still running ratpoison for every thing else.
  • When running a lesser windowmanager, start Xnest, run ratpoison in it an learn to work with ratpoison.
  • Try out other windowmanagers and discover why you should defenitly turn to ratpoison.

Starting a Xnest session

  • First, check if you have Xnest installed. If not, do so now.
  • You must be running X.
  • Then start a simple Xsession:
    Xnest :1 -ac &
    xclock -display :1
    

Now you should see a X-screen without a background and a Xclock on it. If this works, you’re in business 🙂

The :1 in the example above, is the number of your Xsession. :0 is your “regular” Xsession. So if you want to simultaniously open several Xnests, you should change this number:

Xnest :1 -ac &
Xnest :2 -ac &
Xnest :3 -ac &
etc.

Starting a windowmanager in the Xnest-screen

Kill the xclock with <Ctrl-C>.
Next we are going the start a windowmanager. We start with twm (many distros install twm by default, if not then install it first) an ancient but still useable windowmanager:

twm -display :1

Perhaps you see nothing happening, but if you click with your left or right mousebutton in the Xnest screen, you should.

This way you can try many different windowmanagers to find out what your favorite could be.

Some problems you might run into:

  • Not every windowmanager understand the switch “-display :1”
    f.e. ratpoison and afterstep are started with -d :1
    As allways, consult the man-pages.
  • Some windowmanagers don’t like to be started twice

Here you find a screenshot of a Xnest session with fvwm as windowmanger, opening a Xnest session with ratpoison as windowmanager, opening a Xnest session with afterstep as windowmanager.

Play around, experiment and have fun. It could be nice to work as several users different on your system, so that will be our next experiment:

Setting up an ratpoison session as a different user

xhost +
su - different_user
export DISPLAY=ipnumber:0
Xnest :4 -display :0 &
ratpoison -d :4

Explanation:

  • xhost +
    Let others connect to your current X-session
  • su – different_user
    Become user different_user
  • export DISPLAY=ipnumber:0
    Let the different_user-applications connect to the current X-session.
    ipnumber = the ip-number of your system.
  • Xnest :4 -display :0 &
    Start Xnest on display number 4 of the current X-session
  • ratpoison -d :4
    Start the coolest windowmanager on display number 4 and start rocking

Which windowmanagers are there to play with?

Open source software allways inspire people to develop more and more applications. There is a wide range of window managers available. Take a look at xwinman.org – windowmanagers for X and take your pick!

For this kind of experimenting you will find debian most suited. Most applications are only an apt-get away …

Advertisements

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

Information

This entry was posted on August 1, 2011 by in regular and tagged , , , , , .
%d bloggers like this: