Using multiple monitors with Ubuntu, part 1: disper
Dealing with multiple monitors on Ubuntu used to be a pain for me. No more. In a three-part series, I will explain how I have made it very comfortable.
In this installation of the series, I will explain how to use disper, a nifty little tool by Willem van Engen, to simplify changing your monitor setup.
Install disper
I assume you are on Karmic. If you are not, dealing with PPAs differs slightly.
sudo add-apt-repository ppa:wvengen/ppa
sudo apt-get update && sudo apt-get install disper
Use disper
The following basic commands will be enough for most cases. If not, use disper -h to find out more.
disper -s
This will switch to your primary display. If you have a notebook like me, it’s the internal TFT panel. The external monitor or projector, if connected, will remain dark. I use this on the go, of course.
disper -S
This will switch to your secondary display. This could be an external monitor or a projector. Your primary display, in the case of a notebook the internal TFT panel, will remain dark. I commonly use this at home, as I am not too fond of dual-monitor setups.
disper -c
This will show the same contents on both, the internal and the external display. If their resolutions differ, disper will use the lower of the two. I commonly use this for live coding, for instance during a TDD Camp.
disper -e -t top
This will extend your desktop to the other display to the top. You can specify other directions, too: left, right and bottom. I commonly use this for presentations with the OpenOffice.org presenter console.
That’s it. No more manually manipulating nVidia X Server Settings. A quick command, that’s it.
Use key bindings to quickly switch between setups
If you only have a couple of setups you need to quickly switch between, assign hotkeys to them. If you use Compiz, which I believe is the default in Karmic, you can do so via the Commands plugin in the CompizConfig Settings Manager.
In part two, I will explain how to use auto-disper to save and use monitor configurations.
