Subject: bug#41516: Slim package unnessesarily conflates default-user/default-session with autologin

From: Stefan Huchler <[email-masked]>
Date: Mon, 25 May 2020 00:17:53 +0200

The 3 options of default-user / default-login-session and autologin are
not as tight coupled and should in fact it's the wrong way coupled:

> When @var{auto-login?} is true, log in automatically as
> @var{default-user} with @var{auto-login-session}.

So you can set auto-login? #t and don't set the other 2 values and it
then succesfully reconfigures but just presents the normal login screen
and not autologins.

But if you only use default-user or auto-login-session but keep
auto-login? #f this values get not written in the config and therefor
the settings get just ignored:

(if (slim-configuration-auto-login? config)
    (string-append "auto_login yes\ndefault_user "
                   (slim-configuration-default-user config) "\n")
    "")

At least that is true for user, I find no code for the
auto-login-session but when I set it without autologin it seems to get
ignored, too.

But the default user setting works independent from autologin:
https://wiki.archlinux.org/index.php/SLiM#Set_default_username

In fact the default-session seems to be also only useful for autologin
as far as I can tell:

  (let* ((xinitrc (xinitrc #:fallback-session
                           (slim-configuration-auto-login-session
                           config)))
...
login_cmd  exec " xinitrc " %session
...
)

There seems to be different ways to have per user default sessions or
global so I am not 100% sure about that, but you can set default user
without conflating that with autologin, while you maybe need a
default-user for autologin you don't need autologin for a default-user.