Multiple X Sessions

This page shows how you can launch mulitple X servers and then run different desktops and window managers on those X sessions...  all at one time!

Background Information

Linux almost always ships/installs with six text terminals (TTY / "teletype") and six video terminals (VT).

You can use Ctrl+Alt+F1 through F6 to switch between all of the TTY's and Ctrl+Alt+F7 through F12 to switch between all of the VT's.

The default X session (X :0) is almost always located on VT7 (Ctrl+Alt+F7).

TTY1 (Ctrl+Alt+F1) is normally always a text based login screen.

In openSUSE, TTY10 (Ctrl+Alt+F10) is normally always reserved for kernel logging.

Realistically, nobody would ever need more than one true TTY.

My thinking is...  why not free up all possible TTY's and VT's so you can enjoy up to 11 different linux desktops and/or window managers - all at the same time?!?

Let's do it!

Freeing Up TTY's 2 Through 6

By default, linux uses TTY's 1 through 6 for text based logins and only allows graphical X sessions on VT's 7 through 12.

This section will help you turn off the text based logins for TTY's 2 through 6 which will leave us with only one text based login on TTY1.

Open a terminal and...

kate /etc/inittab

Hit F3 and search for --noclear

You should see lines similar to the ones shown below.

Edit lines 2 through 6 by adding a # to the beginning of each line to comment them out.

Change from this:   To this:

1:2345:respawn:/sbin/mingetty --noclear tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

  1:2345:respawn:/sbin/mingetty --noclear tty1
#2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6

Do NOT comment out the line for TTY1.

Save and exit Kate.


You need to reboot one time for all of the changes to take effect.

X Scripts

Download my X Scripts (x.tar.gz) and move it in your bin folder.

Once it is in your bin folder, extract it to that folder.

What's included...   x2, x3, x4, x5, x6, x8, x9, x10, x11, x12, xxx.

I don't know what results you will have if you run these scripts from inside of KDE.  It might work fine.  I think I ran them once this way and didn't have any problems.  Normally I jump over to TTY1, login, and then run my X Scripts from there.

Edit all of the scripts to match the desktops and window managers that you want to run.

I have tried to make this part as simple as possible, for example:

The x2 script starts an X server on display :2 using video terminal 2 (VT2) and is accessible with Ctrl+Alt+F2

The x3 script starts an X server on display :3 using video terminal 3 (VT3) and is accessible with Ctrl+Alt+F3

And so on.

Where are the x1 and x7 X Scripts???

There aren't any.  To keep things simple, TTY1 is in use as a text login, so there is no x1 script, and VT7 is in use as your main desktop, normally KDE or Gnome, so there is no x7 script.

Test Everything

I suggest testing all of the individual scripts first...  one at a time, to make sure things work the way you expect.

You can kill any of the VT's by exiting the desktop or window manager normally (safest)...  or by pressing Ctrl+Alt+Backspace.

Once everything is working, you can edit the xxx script which will fire up all of your X servers and attempt to start all of your desktops and window managers simultaneously.

Note:  the X servers all start automatically with the xxx script, but the desktops and window managers will not automatically load.  You will have to manually jump on to each VT (VT2 - VT12), one at a time, before the desktop or window manager will load.  I originall suspected that this behavior might have been a side effect of the NVIDIA drivers, or possibly just the NVIDIA logo.  I tried to disable the NVIDIA logo to see if this helps, but it did not...  the desktops and window managers will only start fully when you switch to their VT.  I will report back if I ever find a workaround or a fix for this behavior..

X Script Defaults

Assuming you have all of these desktops and/or window managers installed, if you do everything on this page, this is (roughly) what you will end up with:


F1 = Terminal
F2 = Openbox
F3 = Blackbox
F4 = Fluxbox
F5 = Fvwm
F6 = IceWM
F7 = KDE
F8 = Gnome
F9 = WindowMaker
F10 = Enlightenment
F11 = Xfce
F12 = XPde