Introduction: How to Set Up Multiple Monitors in Linux
this tutorial will show you how to set up a multi-head system in most linux distros, primarily ubuntu. please note, this is still largely unfinished.
Step 1: Install Your Hardware.
the title explains it. i'm assuming you know how to open the case and install the cards. just make a note of which card is where and which monitor is on which card. FYI: my system uses one Nvidia riva tnt2, one nvidia riva tnt, and one 3dfx voodoo3. (in that order on the pci bus)
Step 2: Boot Up and Get X Going
if X fails and drops to the terminal type in:
sudo dpkg-reconfigure -phigh xserver-xorg
(if you're already root, don't use sudo)
use the wizard to set up drivers for whatever monitor the wizard is showing up on. (usually the first on the bus)
reboot to start x
Step 3: Check the Order and Find the Addresses
by now you should be looking at your linux desktop on one boring screen.
open a terminal and type
lspci
you should now see a list of devices and their bus id. find the graphics cards and write down the bus id's you'll need them later.
Step 4: Set Up X for Multiple Screens
open your xorg.conf for editing.
in ubuntu, open a terminal and type
sudo gedit /etc/X11/xorg.conf
(again, if you're already root, don't use sudo)
save it as xorg.conf.backup or something simular, i can gaurentee the next step won't work the first time.
now, go back to that list of cards and addresses you made. make a device section for each. like this:
Section "device"
identifier "name for card here"
driver "card driver name here"
BusID "X:Y:Z"
EndSection
replace x:y:z with the bus id of the card, you can replace "name for card here" with anything, but make sure you're using the proper driver for your hardware.
now make a monitor section for each monitor
Section "Monitor"
Identifier "monitor name here"
HorizSync 28.0 - 51.0
VertRefresh 43.0 - 60.0
Option "DPMS"
EndSection
if your monitor has dpms, you can omit the sync and refresh. if it doesn't, remove the dpms line.
Now make a Screen for each card/monitor pair
Section "Screen"
Identifier "screen name here"
Device "card name here"
Monitor "monitor name here"
DefaultDepth X
SubSection "Display"
Depth 4
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
replace X with whatever color depth your hardware can handle.
under each subsection list all the available modes and sizes for each mode.
you can get away with just listing one display section and one resolution, if that's all you'll use, or if you're lazy. try to keep the default depth and highest resolution the same for each 'screen', it makes things much easier.
now, find the ServerLayout section, and add the screens
Screen "first screen name" 0 0
Screen "Second screen name"" RightOf "left"
Screen "third screen name" RightOf "center"
it should now look something remotely like this
Section "ServerLayout"
Identifier "Default Layout"
Screen "first screen name" 0 0
Screen "Second screen name"" RightOf "left"
Screen "third screen name" RightOf "center"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection
add as many screens as you want. use RightOf or LeftOf to tell the computer where the monitors are relative to each other. don't touch the InputDevices and make sure the Identifier is "Default Layout"
Step 5: Cross Your Fingers!
restart x! (in ubuntu just hit control-alt-backspace)
if it works, you'll have a desktop across all (or most) monitors. move the mouse across each to make sure they're in the right order! if they're not, go to the previous step and switch them around in the server layout. if you have one (or more) monitor that won't show anything (and the mouse skips it) make sure you used the correct bus id and driver in the device section. also try checking the bios settings. on my computer i had to set the oldest card (riva tnt) as the primary boot device under pci vga settings in the bios. (even though the newest is used as the primary in ubuntu) if the screen is still blank, but you loose the mouse in it, check the cables and make sure the monitor is on!
from here on, just expiriment with different configurations and arrangements until you find one you like.
now, get yourself some kickin' multi-screen wallpapers!
http://www.triplemonitorbackgrounds.com/
digital blasphemy
deviant art
Step 6: Add Menus (optional)
this only applies to Gnome based distros.
right click on any panel and select new panel
drag it to annother screen, right click on it and add to the menu.
you can also make it look really cool by setting the background color to semi-transparent.
41 Comments
6 years ago
For reference.
Just switched from a single dual-port card (VGA + DVI) with two monitors to a setup with two identical single port cheap and ancient geforce cards. All I had to do after plugging in the hardware was to reboot. It automatically updated the X configuration, and switched both monitors to the maximum available resolution.
OS is Ubuntu 14.04 (it's a LTS release, so I won't drop it too soon).
All I had to do manually after reboot was to readjust each monitor anew via the controls of the monitor, and reconfigure tilda - the different screen resolutions meant it no longer showed where and how I wanted it to.
9 years ago on Introduction
Can this work with a raspberry pi?
Reply 6 years ago
Sure. Provided you find a way to add additional video adapters to a rasp.pi.
9 years ago on Step 5
Hello i am going to run a system with 10 monitors will it work or do need to make something diffrent
Reply 6 years ago
Depending on the video cards you're going to use and the software you're going to run, the IO of your system might become a bit stressed ...
6 years ago
beware this is at least 9 years old (according to the age of some comments)
things have changed. A LOT. so unless you have an OLD pc, this is completely outdated.
as of 2016, the way to go seems to be managing everything through XRANDR (I still gotta try, lol).
8 years ago on Step 4
awsm yrrr i reallly like it nd i made it
12 years ago on Step 4
when i tried, LeftOf was buggy (or i didnt use it properly) caused X to crash with cursor blinking between the screens. using SUSE 11.2/3
13 years ago on Introduction
i used to like PCI cards but they are getting harder to get and they happen to break down if you get an accelerator unless you like the 2mb's (most of which Ms dropped support for after W98). there is a even NEATER way to get triple multi monitor now a days (if you havnt got two long pcie slots) and that is get a soldering iron (if you havnt already got one), and another pcie video board and use the soldering iron to remove the end of the slot so the pcie card fits in (choose a place that has room behind the slot!) and it will work (make sure you have removed enough plastic else it will push the slot apart) and the PC will see it, my PC boots on the Pcie 1x slot tho.... however what i cant say will work (in linux) is if you have ATI and Nvidia cards as i do...... im seeing if i can migrate to linux with my setup.... X700 and GF7800GTX, and maybe choose my funny refresh rates etc.
13 years ago on Introduction
Linux mint has some support for multiple monitors with its workspaces.
13 years ago on Step 4
unfortunately, it doesn't seem to be displaying the way i intended it. These instructions are obsolete now anyway. version 9.04 and 9.10 both have built in support for multihead. (assuming the new xorg supports your hardware, which doesn't work for me)
14 years ago on Step 4
no offence but this was more confusing than helpful it seems like you tried to take short-cuts in your explanation.
14 years ago on Introduction
So... I need multiple graphics cards for multiple screens? Is it like one card per screen? Either way, I'm guessing my ancient Dell Inspiron 2650 ain't gonna work, huh?
Reply 14 years ago on Introduction
On mine, yes, one card per screen. but there are graphics cards with two, or more, 'heads', most newer laptops are dual head. I did this, at first on an old no-brand '486, so it should work on anything with enough open slots.
Reply 14 years ago on Introduction
i have a card with 3 heads vga dvi-i snd s/videoare there s-video to vga converters
Reply 14 years ago on Introduction
Oh! right! I forgot, unless you have two cards or your card has two "heads" you can't plug in two screens cuz theres no input... duh! wasn't thinking, sorry! and thanks guys!
Reply 14 years ago on Introduction
there is a really old, and extremely ghetto hack that splits one vga signal into three (monochrome) images to be viewed on old TVs. Basically it's a software hack, as the only hardware is a vga plug hooked in to 3 old TVs, it's all done by messing with the video card. (it's on hackaday.com somewhere)
Reply 14 years ago on Introduction
The short answer's no. I am using an NVidia that has two heads, VGA and HDI. There is a monitor plugged into each, a HDI -> VGA converter on one. It was easy to do using the NVidia control panel that came with the linux drivers.
14 years ago on Step 6
Great script! I have a bunch of identical NVidia cards laying around as well as the GeForce4 9600 that's in my AGP port. It was a little more tricky with AGP but not impossible. After installing a Matrix-like openGL screensaver it looked pretty sweet. Thanks for the info!
14 years ago on Introduction