I have three monitors. My login does not position the monitors properly -- the left and right monitors should be swapped. How do I adjust the resolution and monitor position for the LightDM login screen?
Here is my output from xrandr when logged in. I would like to use the same settings for my login screen and lock screen.
Screen 0: minimum 8 x 8, current 4800 x 1200, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1600x1200+3200+0 (normal left inverted right x axis y axis) 367mm x 275mm
1600x1200 60.00*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
HDMI-0 connected 1600x1200+1600+0 (normal left inverted right x axis y axis) 367mm x 275mm
1600x1200 60.00*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
DP-0 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 367mm x 275mm
1600x1200 60.00*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
DP-1 disconnected (normal left inverted right x axis y axis)
I was able to solve this problem by installing
arandr
:$ sudo apt install arandr
and running it:
$ arandr
(it is also available in the settings manager).Then I set my monitors the way I like using its GUI. You can try out its configurations on your current desktop by clicking the green checkmark:
Once things were correct, I saved the configuration to my desktop, which generated a .sh file:
#!/bin/sh xrandr --output DP-0 --mode 1600x1200 --pos 0x0 --rotate normal --output DVI-I-1 --primary --mode 1600x1200 --pos 3200x0 --rotate normal --output DVI-I-0 --off --output DP-1 --off --output HDMI-0 --mode 1600x1200 --pos 1600x0 --rotate normal
I then copied that file to
/etc/lightdm/monitor-config.sh
as root.Finally, with
su
I edited/etc/lightdm/lightdm.conf
(which did not exist) to include the following lines:I did that, logged out, and my login screen had the right monitor positions.