[systemd-devel] How soon after login can I rely on systemd --user having reached sockets.target?

Damien Robert damien.olivier.robert+gmane at gmail.com
Thu Oct 23 01:09:29 PDT 2014


Zbigniew Jędrzejewski-Szmek  wrote in message
<20141019135812.GU29695 at in.waw.pl>:
>> > PAM creates sessions by calling into systemd's pam-module, which then
>> > uses CreateSession() (internal api!). This call does not return until
>> > the job of user at .service is done. `systemd --user` notifies READY=1
>> > only after "default.target" is ready.
> Hm, this seems a bit excessive, because default.target can take 
> a while. basic.target would seem more natural.

But isn't using default.target more flexible than basic.target? When
basic.target is activated I expect at least socket.target, timers.target
and path.target to get activated too; whereas I could imagine an user
wanting a completly empty user session [*], which could be done with an empty
default.target [#].

[*] I don't use cron anymore, so I don't know if a cron session goes
through systemd's pam module in my distribution's pam settings default, 
but I could imagine that if it were the case we would want a mostly empty
user session in this case.

[#] With DefaultDependencies=false

Right now by default default.target is a symlink to basic.target. It seems
natural that the user session starts default.target, like the system session
does. Otherwise what would be the meaning of default.target? Something
started by the DM when the user logs in rather than by pam?
(Actually now that user sessions are getting more used, it would indeed be
nice to standardize a name of a target to start when a graphical login is
used!)



More information about the systemd-devel mailing list