Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 just added a 2nd monitor and I ran into that oh so typical issue where the monitors are swapped.

Apparently, the 2nd monitor has been identified as "monitor 0" by X.org, but it's # 2 according to the ATI configuration applet. (The applet numbers the monitors starting with 1, not 0.) That said, this 2nd monitor is the first one listed by the applet.

This concerns me, as I have run into issues on Windows with dual-monitors swapping randomly after reboots. Moving the Gnome panels over was easy enough, if not exactly obvious. However, I wonder about the possibility of other things using "monitor 0" when, in this case, I would expect them on "monitor 1."

So, can I control which monitor is considered primary?

share|improve this question
up vote 3 down vote accepted

Often your monitor setup can be found in the Xorg configuration file /etc/X11/xorg.conf.

However, many modern distributions (such as recent Ubuntu releases) try to avoid using a configuration file, since maintaining it can be a pain. You can create this file initially by running:

# Xorg --configure

From there you can make further customizations. The Arch wiki has an article that should help with making customizations.

If you want to change your primary monitor without editing xorg.conf you can try the following:

 $ xrandr --output XXXX --primary

Here XXXX should be replaced by the output you want to be primary. You can run

$ xrandr --current

To see the current configuration and see what output devices are available. Typically these will have names like "VGA1", "LVDS1", or other names that refer to the connection that is used.

Setting the monitor as primary will typically move your panels over as well, which is nice if you are using a laptop and want to change which monitor is the primary monitor multiple times a day. I find this a lot nicer than creating an xorg.conf file, but my monitor configuration changes multiple times a day.

share|improve this answer
This didn't exactly answer my question, but it solved my problem. So, I modified the original question, which was a bit rigid. That said, I still want to know why the monitors are ordered the way they are. – George Marian Jan 12 '11 at 2:38

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.