Reputation: 11
Is there a way to create multiple X sessions on a machine (not using VNC)? I'm looking to create a virtual or secondary X session that has multiple displays and monitors as defined by my xorg.conf.
Upvotes: 1
Views: 2205
Reputation:
At the lowest level, starting a second X server is as simple as launching the X
program with a display name as an argument. Your first one will have the display name :0
so to avoid conflicting with it:
X :1
(you'd want to do that from a text console, not from inside an existing X session).
It will start itself on the next available VT, so if you switch to your first X server with Alt+F7, the second one will be reachable with Alt+F8.
That will just be a server though, nothing will be running on it so it'll be a blank screen with a mouse cursor. You can direct programs to run on it with the DISPLAY
environment variable. Starting a window manager should be enough to get you a usable session:
DISPLAY=:1 twm &
If you're not interested in the low-level stuff and you want something more like your normal login session, you can try the startx
tool. It takes server options after a --
so you can run
startx -- :1 &
If you want a second X server to start at boot time and show a login screen, add it to your xdm
(or other *dm
) configuration. For xdm, this would be /etc/X11/xdm/Xservers
Upvotes: 1