[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: init system policy



On 21/11/14 14:04, Philip Hands wrote:
> A quick glance at the manual leads me to try:
> 
>   systemctl disable gdm3
> 
> (and ... gdm, and a few other things) -- none of which work.

Display managers are unusual here; they're an exception to the usual
"enabledness" stuff.

Normally, a service is enabled by adding symlinks so that an appropriate
"target", like multi-user.target, "wants" the service. "systemctl
enable/disable" (and Debian layers like the systemd support in
update-rc.d) just adds/removes that symlink.

However, systemd starts the (single) selected display manager via the
alias display-manager.service, which is meant to point to whichever
display manager is required; it is display-manager.service, not
gdm3.service, that is configured to be "wanted" by multi-user.target.
This is analogous to /etc/X11/default-display-manager, and display
managers' maintainer scripts use that file to decide where
display-manager.service should point.

Display managers that participate in this mechanism do not need to be
"wanted" under their own names (although if the selected one is, systemd
will realise it's just an alias, and won't start it twice).

FYI, you can prevent gdm3 from being started by systemd under any
circumstances by applying a bigger hammer: "systemctl mask". This is
syntactic sugar for making a symlink gdm3.service -> /dev/null.

    S


Reply to: