How do I reset the layout of LightDM?

I have some desktops in the office that have their monitor layouts in reverse. While I know its possible to do it via xrandr or even manually rearranging the monitors physically, I don’t wanna have to do it one at a time, so I always set it up by using which one the dGPU will treat as primary.

Hence why I’m looking for something that I can just run in one go and not have to manually tweak for each hardware.

The lightdm-settings package should be installed, maybe that could help?

nah didn’t do jack
Unless there’s an option I overlooked

Moved to Support and Help as it’s a more suitable location for this question

There is no way for the OS to know, for a multi-monitor setup, which monitor(s) is in which position(s) (–right-of, --left-of, --above, --below) relative to the “primary” monitor.

You must provide that manually.

You could configure each machine once with a custom config file specifying the layout arrangement that xrandr manages (i.e. saving the actual xrandr command as a one-liner in that config file) then specify that as a systemd target to be run at boot.

I don’t know enough to tell you which systemd “service” needs the “target” file specification to contain a pointer to execute that config command.



You might also want to glance at the following pages:

+1. And for deploying the command I would use one of the *-setup-script options of lightdm config. Some related links:

https://wiki.archlinux.org/title/LightDM

For what it’s worth, some years ago I had an issue with LightDM resolution of the login screen that I fixed by using xrandr invoked via one of LightDM’s *-setup-script settings, don’t remember which specific *-setup-script setting I used but I think it might have been greeter-setup-script in my case. However that was resolution issue and not dual monitors

1 Like

I understand that part, but there’s always a “default” horizontal position. 99.99% of the time, the primary is where the BIOS starts up first.

In my situation, the company thin clients are setup with the following:

The trick I normally do is to plug the primary monitor on the left-most, essentially where the BIOS would show itself first when multiple monitors are plugged in. Its normally enough for most people, unless they do a vertical monitor layout, then thats when I’d use xrandr (I did something similar once when I had a vertical monitor with SDDM).

I just want a quick and clean way to just “force reset to very default”. Right now, I end up just re-arranging the monitors physically just so that the screen where UEFI POSTs is the same as the primary monitor. Just seems to be the fastest since I won’t have to jump in and run an xrandr and try to determine which monitor is which.

I WISH I could do Wayland, and not worry about this (unsure with GDM, but my SDDM can be arranged without xrandr anymore), but the primary software we’re using doesn’t play nice with it.

Are you asking for a way to reset to “side-by-side” defaults, versus “top+bottom” setting, undoing a previous xrandr setting?

Or are you looking for a command/script to “flip” the assigned positions/identifiers for an existing physical placement?