40

How do I change my primary monitor without using the command line?

belacqua
  • 23,120
trampster
  • 11,342

11 Answers11

25

Until Ubuntu Brainstorm Idea #17526 becomes a reality, it seems there is no way for non-NVIDIA users to change the primary display (not just move the panels) without resorting to the command line.


Edit 2014-05-30: That answer is a little outdated now. Ubuntu Brainstorm no longer exists. And other answers to this question have better solutions, both for Ubuntu, and other distros.

In MATE, "Preferences > Monitors" has a "Make Default" button. That's what you're looking for.

In GNOME 3, "Settings > Display" doesn't have a "Make Default" button. Instead it has a toolbar-looking bar at the top of one of the displays. Drag that to the display that you want to be primary.

I believe Unity is similar to GNOME 3, but the toolbar is on the side -- I don't know for sure though; I'm not running Unity myself.

In KDE, under "System Settings > Display and Monitor" there is a star on each display that you can click to set which is primary.


Edit 2015-02-25: It's heart-warming to know that Linux desktop environments are progressing.

Ubuntu GNOME 14.10 features GNOME 3.12. Open Displays, and choose the secondary display. A list on the left lets you set the display to "Primary", "Secondary Display" (selected), "Mirror", or "Turn Off".

enter image description here

Unity no longer has an equivalent of primary desktop. You can set "Launcher placement" to either of your displays, or all displays.

enter image description here

Ubuntu MATE and Kubuntu are unchanged.

kaapstorm
  • 384
14

I was having problems with the primary monitor reverting on reboot. Was getting pretty annoying. So I did some searching around and was able to find a solution of my own.

First select your primary display.

Select primary display

Make sure you save your settings, then close.

Next you need to edit the monitors configuration file.

gedit ~/.config/monitors.xml

Find the display you wish to make primary, and change to

<primary>yes</primary>

And make sure to change the other monitor to

<primary>no</primary>

Now save the files, and reboot.

Example config

<monitors version="1">
  <configuration>
      <clone>no</clone>
      <output name="DVI-I-0">
      </output>
      <output name="DVI-I-1">
      </output>
      <output name="TV-0">
      </output>
      <output name="DVI-I-2">
          <vendor>SYN</vendor>
          <product>0x0022</product>
          <serial>0x00000326</serial>
          <width>1360</width>
          <height>768</height>
          <rate>60</rate>
          <x>0</x>
          <y>312</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>no</primary>
      </output>
      <output name="DVI-I-3">
          <vendor>ACI</vendor>
          <product>0x24f2</product>
          <serial>0x01010101</serial>
          <width>1920</width>
          <height>1080</height>
          <rate>60</rate>
          <x>1360</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>yes</primary>
      </output>
  </configuration>
</monitors>

Now when you reboot the display should be selected as primary.

My setup is as follows:

  • Ubuntu 12.04.1 (64-bit)
  • nVidia GTX 260 (using latest drivers)
  • If the "X Server Display Configuration" is not displayed to someone, you can check this answer https://askubuntu.com/q/1467567/1125160 – Mr. Blond Sep 09 '23 at 10:10
11

Worked for Xubuntu 14.04 Trusty tahr nvidia gtx 760 using proprietary driver 331.38 on x86_64.

"Settings manager" -> "Session and Startup" -> "Application Autostart" register -> add following command:

 xrandr --output HDMI-0 --primary

specify title yourself so you recognize if changed later on. You can give even further arguments to it.

To know which monitor is which you can either call xrandr -q on the commandline or install arandr (available in the settings-manager too) to list the monitors.

keiki
  • 1,927
  • Thank you. Works great. P.S. Just run xrandr to get the correct display device name. – saurabheights Oct 17 '19 at 15:45
  • Just to add To view all displays/ monitors attached xrandr eDP is inbuilt display in my laptop to make primary xrandr --output eDP --primary External Display to make primary xrandr --output HDMI-A-0 --primary – Vinay Verma Jun 09 '21 at 09:25
6

For most video cards:

Go to the monitors preference panel. On a default desktop install this is: System - Preferences - Monitors

Uncheck the "Same image in all monitors" box and hit "Apply".

Hold the Alt key and drag the top and bottom panels to the screen that you want to be the primary display.

For NVidia video cards:

Run the NVidia settings tool. On a default desktop install with the NVidia proprietary drivers enabled, this is: System - Administration - NVIDIA X Server Settings

Select "X Server Display Configuration".

Choose the display you want to be the primary display and check "Make this the primary display for the X screen" and hit "Apply".

fader
  • 5,571
  • this does not actually change the primary monitor, Applications still start on the wrong monitor and full screen video playback etc happens on the wrong monitor. – trampster Aug 04 '10 at 21:42
  • Applications should start on the display that was clicked most recently. (I tested this by launching a slow-starting application from the menu on my primary display and quickly clicking on a window on my secondary display.)

    Similarly, full-screen video should happen on whichever display you were using when you caused the video player to go full screen. Could you provide more information about your setup and the applications you're using?

    – fader Aug 04 '10 at 21:46
  • 1
    Flash videos for example will play full screen on the primary monitor, some of the linux video applications do the same. – trampster Aug 04 '10 at 22:06
  • OpenOffice presentations also are displayed according to what the primary monitor is. – trampster Aug 04 '10 at 22:11
6

Quickest way is to just switch the cables on the back of the computer.

4

I just deleted ~/.config/monitors.xml and logged out and back in, then went to Setting / Monitors and re-saved. This created a new monitors.xml file - and that fixed the problem.

Kylea
  • 407
2

In Ubuntu this can be solved as follows:

Click on the Gear Icon on the Unity launcher (the bar on the left side of the screen). The icon is labeled System Settings

Look under the Hardware Section and click the Displays icon

Turn off Mirror Displays (optional)

CLick on one of the display rectangles and drag the displays around to whatever order you prefer

Set any other desired options. For example, you can set the Launcher to only show up on one display

Click Apply

You will now have the primary monitor setup as desired - all without using the command line as mentioned in your question.

Snap Shot
  • 531
2

In Unity with 14.04LTS nothing of this works. The monitors.xml is well written and has the primary well and positions well defined but when reboots, it ignores the primary and position.

This seems to help http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost

Altough i am unable to make the suggested script to run on reboot. I added the command to run it in the startup but it does not appear to work. But after reboot even if i increase the delay of execution; if i run manually the script it corrects the monitors.

kaf
  • 123
1

To move them all at once, turn off the secondary monitor, confirm, and turn it on again - and all programs will be on the primary monitor.

Braiam
  • 67,791
  • 32
  • 179
  • 269
user222389
  • 11
  • 1
1

In the Screen Display manager, both your monitors must be shown side-by-side. You can drag the left one to the right side to switch the primary monitor between them.

orezvani
  • 433
  • That has the unwanted side effect of setting the primary as the "left" screen. If physically it is located on the right, that will be a tad confusing...;) – mmalmeida Feb 24 '15 at 09:58
  • @mmalmeida Depends on what side of the road you drive ;) That display manager seems very buggy though – orezvani Feb 26 '15 at 09:06
0

With Ubuntu 16.04.2, I had to define, in first, the screen primary by xrandr command :

xrandr  --output  Monitor_ref°  --primary

and then drag and drop the right screen to the left.

The ~/.config/monitor.xml file was then updated.

I didn't find any other solution, without a command line.

°Monitor_ref can refer to various outputs VGA-0, DVI-0 etc. The output of xrandr -q will list them.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183