On my Debian desktop, I have both of my primary monitors in portrait mode, with a third monitor in landscape mode. The login screen is therefore rotated 90 degrees from how it needs to be. After login, I need to manually go into System Settings, and manually rotate the monitors.
That is, up until now. A little poking around says I need to:
apt install arandr
This is a GUI application which will create a script in .screenlayout which can be auto-started upon login:
$ cat .screenlayout/bythree.sh #!/bin/sh xrandr \ --output DisplayPort-0 --primary --mode 3840x2160 --pos 0x8 --rotate right \ --output DisplayPort-1 --mode 3840x2160 --pos 2160x0 --rotate right \ --output DisplayPort-2 --off \ --output DisplayPort-3 --mode 2560x1600 --pos 4320x0 --rotate normal \ --output HDMI-A-0 --off \ --output HDMI-A-1 --off
This can be autostarted in LXDE with:
$ cat ~/.config/lxsession/LXDE/autostart @lxpanel --profile LXDE @pcmanfm --desktop --profile LXDE @xscreensaver -no-splash #@~/.screenlayout/bythree.sh <= does not work #@${HOME}/.screenlayout/bythree.sh <= does not work # make sure there is a line return at end of command: @/home/me/.screenlayout/bythree.sh
Instructions for the autostart file can be found at LXSession.