Title: Feature request: Autologin with last used session of Desktop Environment on sddm

Hello,

It would be very useful to have an option like:

sudo nano /etc/sddm.conf

[Autologin]
User=username
Session=lastsession or last

So SDDM can automatically login the user, but using the last session
(KDE, GNOME, Wayland/X11) that was used before logout.

This would be very helpful for users with multiple desktop environments.

Thanks.

To this end I have this in /etc/sddm.conf.d/kde_settings.conf, which can have any other name such as autologin.conf as well, and it works as expected:

[Autologin]
Relogin=false
Session=plasma
User=<my_user_name>

Maybe that’s what you’re asking?
I don’t think something like Session=last-session would make much sense in a autologin scenario.
However, it could be useful if this was included in System Settings.
PS: As this comes with a privacy and security risk, I prefer forcing Screen Locking via a login script immediately upon Autologin, which is only executed when it’s a “sddm-autologin session”).