Hello, I want to have lightdm installed on my system, but not automatically started at boot. To achieve that, I used update-rc.d lightdm disable but lightdm still gets started at boot. Samuel
Hi Samuel,
Samuel Thibault wrote (16 Nov 2014 14:50:08 GMT) :
I see that lightdm.postinst reads:
# set default-display-manager systemd service link according to our config
if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" -a -d /etc/systemd/system/ ]; then
SERVICE=/lib/systemd/system/$(basename $(cat "$DEFAULT_DISPLAY_MANAGER_FILE")).service
if [ -e "$SERVICE" ]; then
ln -sf "$SERVICE" /etc/systemd/system/display-manager.service
else
echo "ERROR: $SERVICE is the selected default display manager but does not exist" >&2
fi
fi
... which leads me to think that as long as the default DM is lightdm,
even if one disables the lightdm service, a display-manager service is
set up and will start. If my guess is correct, then that's a bug in
lightdm (or in the display-manager logic, perhaps other DMs have the
same), not in systemd.
What's the output of these commands?
# systemctl status display-manager.service
# systemctl status lightdm.service
Cheers,
Hello,
● lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; enabled)
Active: active (running) since dim. 2014-11-16 23:51:12 CET; 55s ago
Docs: man:lightdm(1)
Process: 1238 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ] (code=exited, status=0/SUCCESS)
Main PID: 1245 (lightdm)
CGroup: /system.slice/lightdm.service
├─1245 /usr/sbin/lightdm
├─1254 /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
└─2032 lightdm --session-child 12 19
nov. 16 23:51:12 type systemd[1]: Started Light Display Manager.
nov. 16 23:51:14 type lightdm[1946]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
● lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; enabled)
Active: active (running) since dim. 2014-11-16 23:51:12 CET; 1min 5s ago
Docs: man:lightdm(1)
Process: 1238 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ] (code=exited, status=0/SUCCESS)
Main PID: 1245 (lightdm)
CGroup: /system.slice/lightdm.service
├─1245 /usr/sbin/lightdm
├─1254 /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
└─2032 lightdm --session-child 12 19
nov. 16 23:51:12 type systemd[1]: Started Light Display Manager.
nov. 16 23:51:14 type lightdm[1946]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
So it seems they are indeed aliases. I have run
systemctl disable display-manager
and now lightdm doesn't start any more.
Samuel
Hey Samuel, Samuel Thibault [2014-11-16 23:55 +0100]: Indeed I'm afraid this is a "wontfix". lightdm, gdm, and friends can't directly enable/disable their units as this doesn't semantically make sense together with /etc/X11/default-display-manager. With the decision/requirement to make multiple display managers installable in parallel and selecting them via debconf (none of this is new in systemd or related to systemd, BTW) you can't really disable "gdm" or "lightdm", you can only disable "the display manager". So I'm closing this. If you disagree and want to keep this open, this should be reassigned to lightdm and tagged wontfix. Thanks! Martin
Martin Pitt, le Mon 17 Nov 2014 07:39:20 +0100, a écrit :
Well, this used to be working before switching to systemd, and
it's really not obvious to the user that he now has to disable
display-manager too (and that can't be done through update-rc.d).
Perhaps it would be feasible to at least make all the update-rc.d
{xdm,gdm3,lightdm,etc.} emit a warning that this doesn't work when using
systemd, and systemctl disable display-manager should be used instead?
Otherwise I'm afraid we'll again get angry users.
Samuel
Hello Samuel, Samuel Thibault [2014-11-17 9:55 +0100]: Not "too", only that. Or perhaps rearranging the units to be more similar to the init scripts again. But that's the decision of the *dm maintainers. Thanks, Martin