Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been giving the window manager Xmonad a try for a few days now on Ubuntu 11.04. I like it a lot but i just set up a second monitor and haven't found the way to configure Xmonad properly for this.

What i'm trying to get is to set the second monitor as the second workspace. Anyone have any idea?


share|improve this question
up vote 10 down vote accepted

Did you try to configure xorg.conf with Xinerama? You need to enable Xinerama setting it to "true" in the xorg.conf file. By default it will be attributed one workspace to each monitor and you can switch the focus pressing mod-{w,e,r}. If you want to change any configuration you can find instructions here and if in trouble you can check solutions here.

share|improve this answer

There's an easy to use GUI called "arandr" for changing your monitor settings. It's a GUI frontend for the xrandr command line utility.

You can use the xrandr utility from command line to switch back and forth between single and dual screen. In my zshrc (or your Bash login file if you use Bash) I have defined the 'single()' and 'dual()' functions for this.

Your outputs will probably be different - I have one HDMI and one VGA - look for an xrandr tutorial for more detail. In this example, the VGA output is my primary monitor, and the HDMI monitor is to the right of my primary monitor.

# set dual monitors
dual () {
    xrandr --output VGA-0 --primary --left-of HDMI-0 --output HDMI-0 --auto

# set single monitor
single () {
    xrandr --output HDMI-0 --off

I like this because at any point I simply send the single or dual command to my terminal and turn my second monitor on and off.

share|improve this answer
Brilliant tool! – cmc Feb 12 '13 at 9:23
And if you don't know what --outputs are available, try xrandr -q – Tarrasch Jun 23 '15 at 16:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.