< Useful tips >
When starting multiple X sessions with startx
, make sure you have a file called .xinitrc
in your home directory. It's the file that controls things like what window manager is started. For more info about .xinitrc
, have a look at the Changing the default window manager tuXfile.
Because the default screen is 0, some graphical applications may get a bit confused when using other screens. If you type an application's name at the command line of a terminal emulator, the application may run on screen 0 although you launch it from another screen. This isn't a problem, though. Many applications have a command line option for specifying the screen it runs on. For example, to run Gimp on screen 2, you'd start it with:
gimp --display :2
This is actually an advantage. You can launch the application from any X session or virtual terminal you want and send it to any X screen you like!
No one is forcing you to use the same window manager or configuration in all the X sessions. This is probably one of the reasons you'd want to run multiple X sessions at the same time: to be able to quickly switch between different window managers, resolutions, or color depths.
To have an X session with another color depth than the default one, you'd use the -depth
option. For example, to run a second X session with a really ugly 8 bpp color depth, you'd type:
startx -- :1 -depth 8
Of course there are much more options than just the -depth
option. To get more help with startx, check out the manual page:
man startx