How do I start multiple Xwindow sessions?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • X windows

Issue

How do I start multiple Xwindow sessions?

Resolution

It is possible to run more than one X Window System at the same time on different virtual terminals.

Default Red Hat Enterprise Linux installations provides command line console login on screens Ctrl+Alt+F1 through Ctrl+Alt+F6. In most installations X starts automatically when the system boots up. If the system is configured to start X automatically, the first X session on screen Ctrl+Alt+F7 will be already running. In this case a graphical login screen will be seen.

If the graphical login is not setup to come up automatically, Xwindow can be started by running this command from the command line:

# start

The first X session on screen Ctrl+Alt+F7 runs as DISPLAY 0. Additional X sessions can be started on screens Ctrl+Alt+F8 through Ctrl+Alt+F12, to run as DISPLAY 1 through 5.

To start a new X session on Ctrl+Alt+F8 run:

# startx -- :1

Similarly to run X on Ctrl+Alt+F9, run:

# startx -- :2

and so on.

Note that additional system resources are being used to start these new X sessions and it may slow down the performance of the system.

To switch between terminal sessions use the Ctrl+Alt+F# key sequence, where # is the number of the function key (1 through 12). Keys F1 through F6 provide a text based console. The X sessions run on F7 (starting with DISPLAY 0) through F12. When a new X session is started it will switch the display to the its screen. Use the key sequence to switch between the multiple sessions started on the system.

For example, to switch to the primary console press Ctrl+Alt+F1. To return to the first X session press Ctrl+Alt+F7.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments