Tip: Right click on the banner blow and open it into a new windows or tab.

Repairing and Upgrading Your PC by O'Reilly Media

August 18, 2009

Using multiple window managers with nested Xserver

I use gnome as my default desktop at home and at office. However, my machines have alternate desktop environment such as kde or xfce installed. I use it to test out features of these environment. The normal way to switch to a different desktop is to log out from the current desktop , select a new session from the gdm login window and login again. However, it is possible to open a new desktop environment in a virtual console using xnest nested xserver.

Installation

$ sudo apt-get install xnest

Using Xnest to run another window manager.

Method 1
Xnest server can be started from a terminal as below


Xnest :1 -ac &


See the screen shot below. The :1 above indicates virtual X display numbered 1. You can also try other numbers.



Now on the terminal , Type the following command.
export DISPLAY=:1

The above line exports the variable DISPLAY to :1. Now you can open a terminal in the Xnest window by typing xterm & in the terminal. See the screen shot below.



Now try to start up a window manager such as icewm by typing icewm inside the xterm.


I could start icewm and fluxbox and kde like this. However, trying to start gnome-session resulted in some error. I am yet to find out the reason .


Method 2
This method uses gdmflexiserver . gdmflexiserver is a part of gdm and it is used to run gdm session on demand on a virtual terminal.

You can start it to give a gdm login prompt as below.

$ gdmflexiserver -n


You will get a new virtual X with a gdm login screen. See the picture below.


Link

You can log in as a different user using a different session from the above screen. ( All the screen shots were taken on ubuntu 8.10)

No comments: