> From: Vincent Lefevre <[email protected]>
> To: Chris Hofstaedtler <[email protected]>, [email protected]
> Subject: Re: Bug#1072237:
> Date: Fri, 18 Apr 2025 12:32:40 +0200
> On 2024-11-17 17:34:06 +0100, Chris Hofstaedtler wrote:
> > I don't know if it makes sense for libutempter to register sessions
> > with logind;
> 
> Not sure, but I'm wondering whether the -ls xterm option is intended
> to have a visible effect:
> 
>     Finally, -ls is not completely ignored, because xterm -ls -e does
>     write a wtmp entry (if configured to do so), whereas xterm -e does
>     not.

(that was quoting xterm's manpage)

fwiw xterm relies upon utempter to do what's appropriate.

In a quick check, that's since

Patch #188 - 2004/5/12 - XFree86 4.4.99.6

     * improve  ifdef's  for  utempter  library  to  omit direct calls to
       setutent() or getutent() (adapted from patch by Christian Biere).

The README for utempter says

        The utempter is a privileged helper used by libutempter library to 
manipulate
        utmp and wtmp files.

and (the documentation appears to be written in C) the last thing utempter
does if no errors stop it is this:

        (void) updwtmp(_PATH_WTMP, &ut);

utempter uses setgid, while systemd (whose documentation is per-line of
code no better than utempter) appears to require root privilege
(which of course is a big step backwards).

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to