Skip to content
Unix Server Solutions
  • Server
  • Apple
  • Database
  • Ubuntu
  • Linux

Ubuntu – Personalize monitor position before login

lightdmlogin-screenmultiple-monitors

I'm using multiple monitors.

When logged in everything is fine: The left monitor is positioned to the left and the right monitor is positioned to the right, but before I log in, the login-screen positions them the other way around.

This is also the position presented by bios and then the grub menu.

I don't mind where the login is displayed, but when moving the mouse, the boundary is the wrong way around and that's annoying.

Best Answer

I was experiencing this too. So long as you have your monitors configured as you want them in your user space then you should be able to follow these steps to set your monitors up the same way on the log in screen:

  • Open a terminal
  • Type sudo cp ~/.config/monitors.xml /var/lib/lightdm/.config/
  • Enter user password
  • Reboot your computer

Kudos goes to this post over here for pointing me in the right direction: Wrong Login Screen Resolution

Related Solutions

Ubuntu – Dual monitor setup not working on XFCE login screen

Install arandr by pasting the following in terminal:

sudo apt install arandr

Open arandr. Your screens are probably configured how you like. If so, go to Layout > Save As. Open the saved script and copy the entire xrandr command.

Create the file /etc/lightdm/lightdm.conf if it is not created already. You can use:

sudo mousepad /etc/lightdm/lightdm.conf

Now paste the following. Replace my xrandr command below with your own.

[Seat:*]
display-setup-script=xrandr --output VGA-0 --mode 1440x900 --pos 0x72 --rotate normal --output DVI-0 --mode 1440x900 --pos 3360x82 --rotate normal --output HDMI-0 --mode 1920x1080 --pos 1440x0 --rotate normal

Reboot and your login screens should be correct.

Ubuntu – How to adjust display settings for LightDM greeter on 18.04

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:

enter image description here

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:

[Seat:*]
display-setup-script=/etc/lightdm/monitor-config.sh

I did that, logged out, and my login screen had the right monitor positions.

Related Question
  • Ubuntu – Dual monitor setup not working on XFCE login screen
  • Ubuntu – How to adjust display settings for LightDM greeter on 18.04