Quack,

On 2026-02-26 20:51, Helmut Grohne wrote:

thanks for maintaining greetd. I tried using it to autologin a user with
sway. This can be sensible e.g. when using full disk encryption or when
using greetd to implement a kiosk-style system. I am observing that
greetd is started relatively early. At least rtkit and dbus-broker are
started after greetd spawns sway. In the end the login session fails
(with no clear indication why).

You're simply using this kind of configuration?
[initial_session]
command = "sway"
user = "myuser"

I have never used this feature but that's a legitimate use case.

Why are you mentioning rtkit, is there anything at this stage that requires it?

I'm not using dbus-broker, it is doing a Before=basic.target and Requires=dbus.socket while dbus-daemon does not have the Before. Except for this the configuration is similar although I wonder why dbus-broker uses DefaultDependencies=false and manually adds what this option would have added.
So it would not seem to be the reason.

If I later remove /run/greetd.run, and systemctl restart greetd,
autologin reliably works.

Why would you need to remove the file manually? the restart should take care of that.

How do we want to move from here?
 1. Declare not-a-bug. If I reconfigue greetd to launch a payload that
    requires further service, it is my responsibility to declare them.
 2. Find out what services are typically required and list them
    explicitly in the systemd unit. (How?)
 3. Declare After=basic.target. This may defer the presentation of the
greeter more than necessary, but for me it was hardly noticeable. It
    also saves us from figuring out what the correct dependency is.

If you choose 1, please tag wontfix and close.

I would prefer option 2 but I don't know yet how to find the dependencies.

I looked at what basic.target entails on my system and it drags remote-fs.target/nfs-client.target so in certain configuration that could lead to a certain delay. Although gdm3 does After=rc-local.service which in turns requires basic.target, I'm not sure it's the way to go. lightdm has the same dependencies as greetd (or maybe I took inspiration from it). If I have time I'll try to check the impact on the delay.

In my situation I use LDAP auth and never experienced any problems but maybe I'm not typing fast enough. Do you need any remote mount or user resolution that requires network access?

Regards.
\_o<

--
Marc Dequènes

Reply via email to