Paul Eggert <[email protected]> writes:

> On 2026-04-18 11:29, Collin Funk wrote:
>
>> The issue I have with this solution is that it requires the 'who'
>> program to maintain an ever expanding list of user names used by desktop
>> managers.
>
> Maybe filter them out if their login shell ends in "/nologin"?
>
>> Also, I guess this is mostly theoretical, but you would want to show
>> 'gdm-greeter' if a user actually named themselves that.
>
> The "/nologin" hack should work in that weird case.

Why not check for class == user?

> Class encodes the session class. It's one of "user" (for normal user
> sessions), "greeter" (for display manager pseudo-sessions), or
> "lock-screen" (for display lock screens).

https://www.freedesktop.org/software/systemd/man/latest/org.freedesktop.login1.html#Properties3

There's clearly already attempts to do this in the code, so it's worth
debugging what goes wrong there.  Sorry if I'm missing something
obvious.
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature

Reply via email to