Running multiple X11 sessions

In: Linux


24 Dec 2008

Got a misbehaving application preventing logout or maybe there’s a game that demands then entirety of your screen? There’s a couple of different ways to start a second X11 instance, both of which are very easy to use. One requires just a few keystrokes, and the other allows you to embed one session within your existing.

Note: This is tested on Ubuntu Intrepid Ibex (8.10)

  1. Switch to tty1 (Ctrl-Alt-F1)
  2. Start X on a second display – this should kick you right into the new X session. Note that displays are 0-base indexed. Your normal session runs on :0. If you need more, use :2, :3, etc. and they should increase along with tty8, tty9.
    startx -- :1
  3. To return to your original X session, switch to tty7 (Ctrl-Alt-F7)
  4. To return to your new X session, switch to tty8 (Ctrl-Alt-F8)
  5. To end your new X session, simply logout as normal, and switch back to tty7 (Ctrl-Alt-F7)

You may also want to consider playing with xnest to embed one X session within another. I haven’t personally tried xnest, but I found a recommendation and thought it might be worthwhile to someone out there.

Hope that helps!

  • Share/Bookmark

Comment Form

  • shiva ramani: good instruction. How to push data to MySQL from SQL 2005 [...]
  • Winkey: I've created a linked server for mysql successfully, and also can do Insert, Select. But when I try [...]
  • RaghuRam: Thanks a lot buddy it helped me to change the root password when I got the error trying to c [...]
  • Taylor Gerring: If you're on a 64-bit OS, did you run the 32-bit version of ODBC applet? Run: odbcad32 [...]
  • Taylor Gerring: If the issue is the guest sync'ing to the host, can't you just force time sync the host if you can't [...]


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States.