Multi-Head Displays in Linux - page 3
IntroductionAs far as running applications goes, multi-head setups are identical to a normal X server. All the apps which work normally in X will run fine. The main difference is that you control which monitor (also known as a "screen" or "display"), the application will appear on. Once you designate a display for that application to use, it must remain there until it exits.
Most programs designed to run in X take a command line argument that tells them
which display to appear on. This usually takes the form of:
where x is the number of the screen (The default screen is usually 0.0, followed
by 0.1 for the second screen, 0.2 for the third, etc.). This can differ from application to
application; for example, a program which uses the GTK widget set has a syntax
command --display 0.x
whereas a program in the GNOME desktop environment can take the command like this:
When in doubt, consult the main page or other online documentation for the command. Sometimes it's not possible to tell a program which display you would like it to use on the command line. For these situations, you can use the DISPLAY environment variable, which will supersede anything else. To do that, write a shell script like this:
#Set the variable to the desired display, in this case screen 2
#This is an example command
environment variables are passed down to child processes when they are spawned.
What this means in a practical sense is that if you have an xterm on monitor
number two, all the programs you run from that xterm will appear on monitor two
by default, regardless of command line switches.
Window managers work in much the same way as normal programs, except that some window managers such as Window Maker and FVWM will take over all the available screens automatically. Others, such as IceWM, require you to run a new instance of the server with the -display switch for every screen. This allows you to perform nifty tricks, such as running a different kind of window manager on each monitor!
- 1Linux Top 3: Fedora 24, Peppermint 7 and Solus 1.2
- 2Linux Top 3: Alpine Linux 3.4, deepin 15.2 and Linux Lite 3.0
- 3Linux 4.7 Set to Boost Live Patching, Security and Power Management
- 4Linux 4.6 Charred Weasel adds USB 3.1 Support
- 5Linux Top 3: OpenIndiana 2016.04, Ubuntu 16.04 and Debian's New Leader