Force gdm login screen to the primary monitor
Solution 1
For newer versions of Ubuntu such as 13.10 or upgraded 13.04 using Gnome 3.8, this procedure is different because the X configuration file no longer controls the monitor layout. You must do the following:
Set the monitor layout correctly as a logged-in user (see Permanantly set monitor as primary)
-
Copy the configuration file over to the gdm settings
cp ~/.config/monitors.xml ~gdm/.config/
For more details, see https://bbs.archlinux.org/viewtopic.php?id=161903
- Within the monitors.xml file there are tags labeled:
<primary>something</primary>
For the monitor you want to be primary put a 'yes' in between the tags and a 'no' for all other screens.
ex: <primary>yes</primary>
Solution 2
If twinview does it the same way the ATI catalyst control center does it, there is a xorg.conf you can edit with gksu gedit /etc/X11/xorg.conf
The relevant part of mine looks like this:
Section "ServerLayout"
Identifier "amdcccle Layout"
Screen 0 "amdcccle-Screen[1]-0" 0 0
Screen "amdcccle-Screen[1]-1" 1400 0
EndSection
All you have to do (after backing up your xorg.conf of course) is change the ServerLayout by swapping the Screen entries (and adapting the screen numbers), in my case that would be:
Section "ServerLayout"
Identifier "amdcccle Layout"
Screen 0 "amdcccle-Screen[1]-1" 1400 0
Screen "amdcccle-Screen[1]-0" 0 0
EndSection
Solution 3
You can try "Separate X screen setting" on the NVIDIA X Server settings. If you set the desired display to 0, the login window will appear there. It's working for me.
Related videos on Youtube
UnforgivenX
Updated on September 17, 2022Comments
-
UnforgivenX over 1 year
I have two monitors attached to my video card. Primary monitor has a resolution equal to 1280x1024 and the second has 1920x1200. My
gdm
login screen always appears on the second monitor even if it is switched off. My question is how to forcegdm
to show the login screen always on the primary monitor with resolution 1280x1024?I use Nvidia GT9500 videcard in Twinview mode. I can't use Xinerama because vpdau doesn't work correclty in this mode.
What I have found is that mouse pointer always appears in the center of union of the screens and center is always on the monitor with higher resolution. Login screen always shows where mouse cursor is.
Now my primary monitor has a resolution equal to 1920x1080. The problem still persists, mouse cursor always appears in the right-bottom corner of the second monitor.
-
UnforgivenX over 13 yearsit didn't help.
-
Admin over 13 yearsYes, I use Nvidia card in TwinView mode. In this mode every screen is screen 0. So unplugging didn't help.
-
Admin over 13 yearsOkay, no experience with TwinView so sorry can't be of any more assistance
-
UnforgivenX over 13 yearsI have only one screen defined in the
xorg.conf
so this doesn't help. -
Tobias Kienzler over 13 years@Kirill: can you swap the plugs and then change screen ordering in the nvidia settings?
-
UnforgivenX over 13 yearsIt didn't help. Mouse always appears in the center of union of the screens and center is always on the monitor with higher resolution. Login screen always shows where mouse cursor is.
-
UnforgivenX over 12 yearsI've tried this, but Gnome3 crashes each time on login in this mode.
-
Jeremy over 10 yearsConfirmed, it works for GNOME 3.10 as well. The absolute location of
~gdm/.config/
is/var/lib/gdm/.config/
in case anyone else wonders. -
Francois over 7 yearsseen on gnome 3.14:
sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/
-
fgblomqvist almost 7 yearsI can confirm that this simple trick works on Ubuntu 17.04 with Gnome 3.24.2 as well. I just ran the command @Francois posted and now it works like a charm.
-
raphinesse over 6 yearsStill works in 17.10 using Xorg. But don't try to get smart and symlink your user configuration. It will not work.
-
AzP over 5 yearsThis should be marked as the correct answer.
-
msmafra over 5 yearsWorked also for Pop_OS! 18.10
-
Soichi Hayashi almost 3 yearsThis worked on Ubuntu 20.04 with Gnome 3.36.9. I had to do
sudo
for cp as ~/ggm/.config is owned by gdm user - not currently logged in user. I also had to reboot the machine for the config change to take effect (log off doesn't restart gdm) -
Tim Richardson over 2 yearsThis answer, using the @Francois command, works on Ubuntu 21.10. It also provides gdm greeter with the correct monitor layout (which monitor is on the left and which is on the right etc).