To create X-widnows screen for each graphic card outpout (:0.0, :0.1) special parameter ZaphodHeads in xorg.conf must be used. Orginal source of info: http://web.archive.org/web/20130429073111/http://en.gentoo-wiki.com/wiki/X.Org/Dual_Monitors#Single_graphics_card.2C_Multiple_X_screens_with_ZaphodHeads
https://nouveau.freedesktop.org/wiki/MultiMonitorDesktop/
Xorg :1 -configure cp /root/xorg.conf.new /etc/X11/xorg.conf
This will create the file /root/xorg.conf.new, which you can then copy to /etc/X11/xorg.conf
Then you modify the pregenerated xorg.conf to define different screen for each output (available output names you get by xrandr list) using the ZaphodHeads parameter.
Section "ServerLayout" Identifier "default" Screen "Screen0" 0 0 Screen "Screen1" LeftOf "Screen0" EndSection Section "Device" Identifier "Card0" Driver "nouveau" BusID "PCI:1:0:0" Option "ZaphodHeads" "VGA-1" Screen 0 EndSection Section "Device" Identifier "Card1" Driver "nouveau" BusID "PCI:1:0:0" Option "ZaphodHeads" "DVI-I-1" Screen 1 EndSection Section "Screen" Identifier "Screen0" Device "Card0" SubSection "Display" Viewport 0 0 Depth 16 EndSubSection SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen1" Device "Card1" SubSection "Display" Viewport 0 0 Depth 16 EndSubSection SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection
Sample config for intel graphic card:
Section "Device" Identifier "Intel0" Driver "intel" BusID "PCI:0:2:0" Option "ZaphodHeads" "HDMI1" Option "AccelMethod" "sna" Screen 0 EndSection Section "Device" Identifier "Intel1" Driver "intel" BusID "PCI:0:2:0" Option "ZaphodHeads" "HDMI2" Option "AccelMethod" "sna" Screen 1 EndSection Section "Screen" Identifier "Screen0" Device "Intel0" EndSection Section "Screen" Identifier "Screen1" Device "Intel1" EndSection Section "ServerLayout" Identifier "default" Screen "Screen0" 0 0 Screen "Screen1" LeftOf "Screen0" EndSection
None that you can determine the parameter to “ZaphodHeads” by connecting the monitors to the associated ports, starting an X session (it will clone displays by default), and running “xrandr”.
Note that the 'Option “AccelMethod” “sna”' is required on intel chipsets in order to use ZaphodHeads. This is not well documented.
With the X configuration above, you are given two separate “screens”. Using multiple screens in this way gives advantages mainly in terms of speed and hardware acceleration, and in allowing different colour depths on different screens. Another advantage is that your window manager effectively runs independently on each screen, so you can have different configurations on each, or many workspaces on each screen.
The main disadvantage is that you cannot move windows between two screens unless your program has a facility for doing this internally. As well, programs cannot overlap screens or stretch over all of them.
The DISPLAY environment variable on an X Server running multiple screens has the format “:0.0”. The “:0” refers to the server number, and the following digit refers to the screens (counting from zero, of course). To make an application run on a different screen than it would normally start on, run it as
DISPLAY=":0.1" program_name
, where the 1 refers to the screen number that you want it to appear on.
Then it is possible to run indipendent windows manager or Xaphier on each screen. With dedicated keyboard.
sudo DISPLAY=:0.1 Xephyr -nocursor -ac -fullscreen -br :1 -keybd evdev,,device=/dev/input/by-id/usb-04d9_1400-event-kbd &sleep 2 && fluxbox -display :1 & sleep 3 && sudo -u ff -H firefox --display=:1 -url http://cokoli.odorik.cz& export DISPLAY=:0.0
To start firefox in fullscreen mode to run presentation or special barcode reader webpage use this extensions. https://addons.mozilla.org/en-US/firefox/addon/forcefull/
The script starting something dedicated to a second screen can be started from “icon” placed to a ~/.config/autostart dir.
[Desktop Entry] Name=kreditchecker GenericName=kreditchecker Exec=/home/user/.config/autostart/restart_kreditchecker.sh Terminal=false Type=Application