Change primary monitor in Gnome 3

If you use Gnome 3 with more than one monitor attached to your computer, Gnome 3 will make one of your displays the so-called primary display. It will display the Top Bar containing the Activities Button, Clock and Status Menu there. Also, the overview with the Dash and the Workspace list will be displayed on this screen only. Sometimes, Gnome 3 might choose the wrong monitor as the primary display and you need to change it manually. Unfortunately, Gnome 3 does not provide a GUI for this as of yet, so you’ll have to edit the configuration files yourself.

Permanently changing the primary display

If you want to permanently change your primary display, you need to edit the file ~/.config/monitors.xml in your home directory. It’s an XML file that contains a list of all the displays attached to your computer. Each monitor will have a tag called primary, which can be either yes or no. Here is an example containing configuration for two monitors, one connected via VGA and one connected via DVI, the latter one being the primary display:

  1. vi ~/.config/monitors.xml
  2. <monitors version="1">
  3. <configuration>
  4. <clone>no</clone>
  5. <output name="VGA-0">
  6. <vendor>IVM</vendor>
  7. <product>0x46d6</product>
  8. <serial>0x000051ac</serial>
  9. <width>1280</width>
  10. <height>1024</height>
  11. <rate>75</rate>
  12. <x>1280</x>
  13. <y>39</y>
  14. <rotation>normal</rotation>
  15. <reflect_x>no</reflect_x>
  16. <reflect_y>no</reflect_y>
  17. <primary>no</primary>
  18. </output>
  19. <output name="DVI-0">
  20. <vendor>IVM</vendor>
  21. <product>0x483c</product>
  22. <serial>0x000003b6</serial>
  23. <width>1280</width>
  24. <height>1024</height>
  25. <rate>75</rate>
  26. <x>0</x>
  27. <y>0</y>
  28. <rotation>normal</rotation>
  29. <reflect_x>no</reflect_x>
  30. <reflect_y>no</reflect_y>
  31. <primary>yes</primary>
  32. </output>
  33. </configuration>
  34. </monitors>

You need to find the right monitor, where you want your Top bar and Overview be displayed and change the content of the primary tag of that display to yes. Of course, all other monitors primary tags should be set to no. That’s it. On your next login into Gnome 3, the settings from this file will be applied and you are set.

Temporarily changing your primary display

If you just want to change your primary display until the end of your session, you could use xrandr to change the display temporarily.

First, run xrandr without any parameters to display a list of available monitors and their display ids.

  1. xrandr
  2. Screen 0: minimum 320 x 200, current 2560 x 1063, maximum 8192 x 8192
  3. VGA-0 connected 1280x1024+1280+39 (normal left inverted right x axis y axis) 340mm x 270mm
  4. DVI-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm

In the example above, I’ve omitted some of the output. I only listed those lines that contain the display ids of the monitors. Again, we have two monitors attached to the computer, one via VGA and one via DVI. Suppose your current primary display is the VGA monitor and you wanted to set your DVI screen as the new primary monitor. Then you would call xrandr like so:

  1. xrandr --output DVI-0 --primary

To reset, call xrandr again and change the output parameter to VGA-0.

Tags: , , , ,

Shameless plug: If this post was useful to you, please consider buying yourself something from one of my Amazon stores: US store, UK store, FR store, DE store, CA store. If you're not into Amazon, why not donate something to GNOME, Mozilla or Wikipedia? Thank you!

2 Responses to “Change primary monitor in Gnome 3”

  1. Chris says:

    Uhm, you can drag the top bar to the second display, in “Displays” settings. This is permanent for the specific display, i.e. Gnome remembers my desktop TFTs ID, and automatically makes that my main Monitor uppon connection, but leaves my laptops display primary when using random beamers.

  2. Zsuffa David says:


    @Chris: can’t move the top bar.

Leave a Reply