On Sun, 2026-03-01 at 17:46 +0300, Andrei Borzenkov wrote:
> 
> 
> What do you want to interrupt and what you want to "connect between"?
> Apparently you have some very different conceptions than everybody
> else and until you explain them we will be talking past each other.

It is shown below.

I need to

Pam -> shell -> logind, interrupt.

Use PID associated with shell/logind for the DM.

Resume -> launch desktop.

> > Pam -> shell -> logind -> dm -> desktop.
> > 
> > Atm its
> > 
> > DM -> Pam -> shell -> logind -> desktop -> DM ( when desktop exits
> > )
> > 
> 
> That is wrong. There is no logind in this chain. You have already
> been told it.

Logind sessions are started on a shell creation. There is no other way.
There is nothing wrong about that, it is how it works. These
sessions...

$ loginctl
SESSION   UID USER SEAT  TTY STATE  IDLE SINCE
     c1 10001 wlt  seat0 -   active no   -
     c2 10001 wlt  -     -   active no


Those are associated with a PID.

> 
> You need to explain the difference between "shell" and "desktop" and 
> what is the function of "shell" and what is wrong with shell starting
> desktop.

You need a shell, a terminal, to invoke a desktop. Unless you are
directly calling the desktop executable in the DM.

The shell IS starting the desktop... I have no means to interact with
that shell. I know its PID before its created, but once its created I
cannot interact, therefore, I cannot use said PID to query logind.


> Do you want the sessions started by Display Manager to be "detached" 
> from this Display Manager (and you would still need to explain 
> "detached" in this case)?

I just want to connect to logind... This call succeeded, how do you
suggest calling this function?

ret = sd_pid_get_session(pid, &session_id);


Where do you get PID from?

> 
> I still do not understand why DM needs to bother about sessions 
> internals at all and what is the reason for it to spy on the "shell 
> session".

Because, I need to have the PID for the logind session alive for the
above function call to succeed to even connect to logind so I can query
it for SEAT information.


I need to get XDG_SEAT from login, assuming, there will ever be a
"seat1" this is all about multi-seat support.



-- 
Sincerely,
William L. Thomson Jr.

Reply via email to