Permanently set monitor as primary
Solution 1
By opening System Settings > Displays you can change your "primary" screen by dragging the black little bar to the display you want and hit the Apply button. Restarted my PC and i didn't have to use xrandr anymore ^_^
Better explanation than mine you can find here: http://www.thebinaryidiot.com/archives/2011/11/11/gnome-shell-3-2-and-multiple-monitors/
Solution 2
What I did:
places>home folder. Under view, check show hidden files. find monitors.xml
and open it with text editor. make a copy just to be safe.
identify the monitor you want to be primary (vendor brand, resolution etc) and look for the command line < primary>no< /primary>
. change it to < primary>yes< /primary>
Save the doc and reboot to see if it took.
hope that helps someone out there.
Solution 3
echo -e "xrandr --output DFP2 --primary" >> ~/.bashrc
Or add xrandr --output DFP2 --primary
at the end of .bashrc
Solution 4
I have a Three monitor Layout in Ubuntu 14 LTS. One monitor is positioned Vertical. I plugged the monitors in a way that the log on screen is in one of the horizontial monitors!
I used arandr
(apt-get install arandr
) to adjust the monitors layout and saved the layout file, for example /home/username/.monitor_setup.sh
.
I had only to add --primary
to the desired monitor and put the file to the Startup Applications of Ubuntu! (At the command field of 'Add Startup Program' just point and klick your edited layout file!
xrandr --output VGA-0 --mode 1920x1080 --pos 3000x532 \
--rotate normal --output DVI-D-0 --mode 1920x1080 \
--pos 1080x532 --rotate normal --primary \
--output DVI-D-1 --mode 1920x1080 --pos 0x0 \
--rotate left --output HDMI-0 --off
Solution 5
I'm going to build on @pl1nk's answer. It's correct but assumes a few things that aren't the safest to assume. Especially in my case. My display names were different.
Run
xrandr --current
to get a list of displays and their names.Sample output:
xrandr --current Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192 LVDS-1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm 1366x768 60.05 + 1024x768 60.04* 60.00 960x720 60.00 ... 320x240 60.05 VGA-1 disconnected (normal left inverted right x axis y axis) HDMI-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm 1920x1080 60.00 59.94 30.00 24.00 29.97 23.98 1920x1080i 60.00 59.94 1280x1024 60. ... DP-1 disconnected (normal left inverted right x axis y axis)
Pick the one you want to set as primary. In my case, I want HDMI-1 as my primary. You may have a different name or want a different monitor. LVDS is my laptop monitor.
Now that you have the name, the
xrandr --output [name of display] --primary
command, (don't include the brackets), will set the display you want as primary.Running the
echo -e xrandr --output [name of display] --primary" >> ~/.bashrc
command saves it to be run when you log in to your user account.
If you want to set this on boot-up, you'll have to add it to the startup scripts folder. Those instructions change based on your distro.
Andrew Tomazos
Updated on September 18, 2022Comments
-
Andrew Tomazos over 1 year
I am running Ubuntu 12.04 (beta) with a triple head setup and GNOME 3 desktop (i.e. "GNOME" selected not "Ubuntu" at login screen). It seems that it handles multiple monitors by blessing one monitor to receive the Activities bar, Clock, Login Menu, etc. Let's call this the "primary" monitor. How do I change it (permanently) ?
Update: Ok so:
$ xrandr --output DFP4 --primary
Does the trick temporarily. How do I make it permanent? I'm using latest fglrx ATI Catalyst driver
-
Lawrence I. Siden over 11 yearsFound a solution here: askubuntu.com/a/871/29540. Apparently, there's no longer such a thing as "Primary Monitor" (at least with my setup). With the Displays config window open, I had to hold down the alt key and drag each of the panels to the window that you want to see them on.
-
andrey about 11 yearsWould it kill them to have a tick box rather than assume people will see that little black bar and then try moving it? I was scratching my head for ages until I read your post... thanks.
-
Sos almost 11 yearsYour suggestion didn't work (I was not able to drag the little bar on Ubuntu 12.10 Gnome). Yet, disabling the secondary screen and enabling it again moved the little bar ;)
-
Alessandro Cuttin about 10 yearsApparently this is not the case for ubuntu 14.04.
-
Joost over 8 yearsComing from OSX, this is what I tried. However, the bar does not seem draggable on Gnome 3.14.4 (Debian Jessie).