Note: If you are looking for a simple way to have an extra screen on your linux machine showing a status monitor and you don't mind the status screen to go blank when you log out or lock your workstation, skip to the end of this article and read about the new simple solution i have. If you want your status display to be shown even if you're not logged in, then the following might be the solution for you.
i am not sure if anybody else wants to use a setup like this, but here is how i did it anyway: i used 2 24“ screens, 1 old 14” screen, two nvidia graphics cards (with two ports each) and one keyboard and mouse attached to one pc. the pc is running xubuntu 12.04 64bit with the latest nvidia driver package available for xubuntu.
the two 24“ screens are running an x-session together with twinview configured, so it's a classical dualhead setup. the third screen which is attached to the second nvidia card runs a separte x-session (on a separte x server instance) to display a monitoring staus screen and a web-cam picture from our entrance at the office.
my goal is, to work on the two 24” screens and have the status display and webcam always visible on the third screen no matter what i am doing on the first two screens. i want the two 24“ screens to go to stand-by when i am inactive for 15 minutes but the status screen should always stay on. last but not least i only want to have one keyboard and mouse on my desk.
this all sounds like a very simple task at first.. simply run the nvidia x config gui and do a twinview setup with the two screens, enable the third in a separate x-session and you are done. Unfortunately this doesn't work the way i want.. with a setup like this you can achiefe all i want except for one fact: the twin-view screen is not recognized as two monitors and therefore all dialog boxes will open in the center between both screens and if you maximize a window it will maximize across both schreens. now there are xorg.conf options to suppress this kind of behaviour with nvidia twinview but they are all rendered useless as soon as a third screen comes into play with a separate x session. i am therefore left with the option to lose compositing support and configure the nvidia card to have three seperate x-screens and then configure xinerama or i can do it the more complex way but keep my compositing support and add a couple of other benefits (like for example the ability to start a firefox browser on the second x-session while it is running on the first session etc.
my solution bases on a multi-seat setup. multi-seat setups are usually used to have more than one user working on a single pc at the same time. in order to do that you attach at least a second screen, mouse and keyboard to the computer and then definie which screen belongs to which keyboard and mouse and what user can use it. if you did that all correct, you will end up having two workstations but only one physical pc powering them .. very nice to save power and hardware. my solution will have two seats. the first seat is shown on my two 24” screens and uses my mouse and keyboard. the second seat has no mouse and no keyboard and uses the third screen on the second nvidia card. upon booth the second seat will autologin with a dedicated user (statsdisplay) for my status display. the first seat will show a login-screen where i will usually log-in with my normal user.
in order to control the views shown on the status screen i need some means of control over the second seat but i don't want to add a second mouse and keyboard to my desk just for some very rare interactions with the status display. i therefore use a tool called x2vnc on my main seat and a normal vino vnc server setup on the second seat. x2vnc allows you to move your mouse from one pc to another .. like a dual head setup but it works through vnc and between different os's and pc's.. what it technically does is a nice little trick: it adds a transparent 1pixel column to whatever side of your desktop you want (in my case to the right side, as the third screen is to the right of my two main screens). once your mouse moves over the 1px column on the right screen side it is caputred by x2vnc and mouse movements are used to move the mouse on the remote vnc server, in my case the second x-server running my status display. so in the end i can simply move my mouse over to the other x-session as if it was a triple-head xinerama setup.
Section "InputClass" Identifier "ignore_other_seats" Option "Ignore" "yes" EndSection
sudo apt-get install vino
which will install the vino VNC server on yor computer
and configure the vino server so that you can start a vnc session without any interaction from the local user (i.e. set a password and don't enable “You must confirm each access to this machine”)
[Seat:0] xserver-command=/usr/bin/X -config xorg.mainSeat.conf -nolisten tcp -isolateDevice PCI:4:0:0 vt7 [Seat:1] autologin-user=statusdisplay autologin-user-timeout=0 xserver-command=/usr/bin/X -config xorg.statusdisplay.conf -nolisten tcp -isolateDevice PCI:5:0:0 -sharevts
use the PCI-ID's from the respective xorg.conf files. you find them in the “Device” section.
apt-get install x2vnc
sudo service lightdm restart
which will close your current x session and restart lightdm. if all went fine you should now see a login screen on your main screens and a logged in session on your status display. and your mouse and keyboard should only work on the main screen and not on the status display
/usr/bin/x2vnc -east -passwdfile /home/mainuser/.secondscreenpasswd localhost:0
replace mainuser with your main user name.
I recently got two new screens for my main display which lead to a new GPU as well, since my old nvidias didn't support the screens resolution. newer graphics cards often come with more than two outputs like my GeForce 750 with 2 DVI, 1 HDMI and 1 VGA port. I now connected the two main displays to the two DVI ports, and the old 19“ display i still use as a status screen ot the VGA port. since i had some difficutlties in getting the 2-seat setup to work again on a single card i realized it is actually much simpler to just configure the card to run with two x-displays, one featuring the two main screens and the second display runs on the 19” status monitor. upon startup i start firefox with its own profile on the second display and it opens in full screen mode and shows my status display. it all looks like before, it is just a lot simpler to set up. and i must admit, i think this setup could also be possible with two separate cards installed, so you might want to try that first before following my steps below.
to start firefox on the second display i simply run:
DISPLAY=:0.1 firefox -P Statusdisplay
what's cool thoug about the 2 seat solution described above is, that you can regulate the settings (like screen saver, stand by etc.) completely autonomous for the status monitor and it even shows the status screen when the main screen is locked.. so this might still be a better solution for some situations.. for example when the status display is seen by more than just the user of the main screens.
What I configured two years ago was essentially like running an X server on two screens without xinerama. I did that on Xfce. When i switched to Gnome 3 it turned out that Gnome 3 does not support that kind of Multihead anymore. Understandably so, because i think there is really not much use in this setup other than for what I use it for at the moment. So Xorg still shows the second screen, but it does not get a gnome shell, it's just another screen without a window manager running on it.
While we can run a firefox on an X server without a window Manager underneath it, it is a pain or even impossible to get it to run full screen. It will just use part of the screen and won't maximize to full screen. So the solution instead is, to run a second window manager (what xfce did anyway) on the second screen. Unfortunately gnome 3 does no longer seem to be happy running twice on the same system. And at the same time, all i want from that second window manager is to run a single application in full screen.
So instead of Gnome 3 i use now Matchbox on the second screen. Matchbox has no problem starting up with gnome running in parallel and it is inteded to be used in a PDA-like manner, so every application runs full-screen by default - perfect for my application :)
so my startup script now looks like this:
#!/bin/bash export DISPLAY=:0.1 matchbox-window-manager & firefox -P Statusdisplay