Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently installed xmonad on Ubuntu 12.04.3 Precise Pangolin and the default keybindings are mod-w to switch to monitor 0 and mod-e to switch to monitor 1.

Unfortunately my monitors are positioned in the opposite order on my desk, with the left monitor being 1 and the middle monitor being 0. Changing cables won't work since the left monitor will not preserve its maximum resolution of 1920x1200 on VGA (I only have 1 HDMI port and it's using it), even though I tried to install that new mode several times with xrandr --addmode etc.

While I could technically physically swap the position of the monitors on my desk, or swap the xmonad keybindings, I'd love to know if there's a way to swap monitor numbers within X to achieve a similar effect. I haven't managed to find anything on Google, so I'm hoping folks here might know. Thank you!

share|improve this question
    
I'm currently already using xrandr as follows: xrandr --output HDMI2 --auto --left-of VGA1 . Is the idea that I can shuffle them around until they're in the right order? –  Alexandr Kurilin Dec 10 '13 at 22:30
    
Ah brilliant, seems like this worked: xrandr --auto --output HDMI2 --primary --left-of VGA1 –  Alexandr Kurilin Dec 10 '13 at 22:40
    
Care to turn that into an answer maybe? I'll confirm. –  Alexandr Kurilin Dec 10 '13 at 22:41
    
Close voters: This question has a good answer. I see no reason for closing it. –  Seth Dec 11 '13 at 3:41

1 Answer 1

up vote 2 down vote accepted

With xrandr, use the options --right-of , --left-of and --primary as needed.

Once you find the options you desire, call xrandr (with the otpins you desire) at log in.

From your comment:

xrandr --auto --output HDMI2 --primary --left-of VGA1

See http://blog.bodhizazen.net/linux/use-xrandr-to-set-a-screen-resolution/ and man xrandr for details.

share|improve this answer

Your Answer

 
discard

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.