1

I run XFCE on Debian with two monitors next to eachother. The default positioning of the monitors is mixed up. I.e., when the mouse leaves the left edge of the physically left monitor it isn't blocked, but instead the mouse appears at the right edge of the physically right monitor. Of course I want it the other way around, that the physically "outer" edges of the monitors are blocking, while the physically "inner" edges are pass-through.

When logged in, I swapped the position of the monitors in the display settings of XFCE (using xfce4-display-settings) and it works flawlessly. But the problem persists on the login screen, which I think lightdm is in charge of. What setting do I need to change to affect the monitor arrangement on the login screen?

1 Answer 1

2

Generating the command for the adequate configuration

Install the graphical tool arandr: beside allowing to change the current users's layout easily, it can save this current layout in the form of a shell script that runs the xrandr command with all the required parameters to recreate the same layout.

Example of generated "configuration":

#!/bin/sh
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1-1 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI-1 --off --output DP-1-3 --off --output DP-1-2 --off

Using the configuration within lightdm.conf

The parameter display-setup-script usually described in a comment in lightdm.conf:

# display-setup-script = Script to run when starting a greeter session (runs as root)

can run such command. Its environment will already be configured properly (eg: DISPLAY is set etc.).

Just copy the generated configuration script in /etc/lightdm/ with appropriate permissions and execute it from LightDM within a Seat block. For example if the script above is copied, kept executable and named /etc/lightdm/dp-right-of-edp.sh, within the default [Seat:*] block (or possibly [SeatDefaults] depending on what's configured in the local installation), add this line:

display-setup-script = /etc/lightdm/dp-right-of-edp.sh

Of course it's possible to add logic in the script to dynamically select between multiple sets of configurations using any tool for probing (including xrandr itself despite its output not easy to parse).

It should be possible to distinguish the Seat where such configuration should be applied, so it's not applied on remote XDMCP. This configuration could then instead be moved under a block named [Seat:seat0] which appears to be the main physical seat, instead of the default [Seat:*]

1
  • 1
    Thank you for the detailed and prompt response. For reference: I set display-setup-script = xrandr … with the output of arandr in the [Seat:*] part of lightdm.conf. It works perfectly afaict. I don't use XDMCP, so I think it's ok not putting it in [Seat:seat0].
    – 8bc3 457f
    Feb 1 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .