Getting LightDM/sddm to use a custom screen layout (Kubuntu/Xubuntu 18.04 – xorg)
-
- Adjust screen layout using your DE’s tool.
- Install and run arandr. arandr will read the current display layout and allow you to save it as an xrandr script.
- Place the script from arandr somewhere safe (I put it in /usr/local/bin).
- Create file /etc/lightdm/lightdm.conf.d/displays.conf with the following content:
[SeatDefaults] display-setup-script=/usr/local/bin/monitorlayout.sh
Where “/usr/local/bin/monitorlayout.sh” is the path to the script saved from arandr.
For sddm, instead edit /usr/share/sddm/scripts/Xsetup.sh and add a line to have it run the same “/usr/local/bin/monitorlayout.sh” script.#!/bin/sh # Xsetup - run as root before the login dialog appears # set screen layout using Xrandr /usr/local/bin/monitorlayout.sh
- Restart lightdm or sddm
sudo systemctl restart lightdm.service sudo systemctl restart sddm.service