I am running Debian Jessie which uses SystemD. I have so far been unable to find a way to stop X11 from starting on bootup. The raspi-config setting apparently does not do anything.
Can anyone help?
I am running Debian Jessie which uses SystemD. I have so far been unable to find a way to stop X11 from starting on bootup. The raspi-config setting apparently does not do anything.
Can anyone help?
Systemd users "service bunlde" named target, to achieve different system states while booting the system. You need to change the desired state of the system, from graphical to multi-user.
Run
systemctl get-default
Will show you
graphical.target
You could change it with
sudo systemctl set-default multi-user.target
I could recommend this article to understand how to work with systemd https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
raspi-config
wasn't working for me. This is exactly what I needed on Stretch.
– mrswadge
May 20 '19 at 23:06
The GUI login is lightdm
(the dm
is for display manager). This is started as an init service, and the init system on Jessie is systemd.
I believe the name of the service is also "lightdm". You can confirm that:
systemctl list-units | grep lightdm
The middle columns should say "loaded active" and the first one "lightdm.service". Presuming that's it, to disable on boot:
sudo systemctl disable lightdm
update-rc.d lightdm disable
as well; I haven't had much of a look at whatever transitional mess is involved in Debian switching to systemd. If all that doesn't work just uninstall the whole thing (apt-get remove lightdm
), and if that doesn't work give up -- your system is haunted ;)
– goldilocks
May 12 '15 at 08:38
update-rc.d disable
and systemctl disable
, at this point it shouldn't be considered anything other than a screw-up by the Raspbian crew and you should report it as such (https://www.raspbian.org/RaspbianBugs). I have an upgraded-to-jessie pi, but lightdm was removed before the upgrade; there is no reason a GUI login should be inescapable on any GNU/Linux system. The easy way for you, if you don't care, should be just the apt-get remove
; doing a bug report is more tedious, but if you are up to it, remember to give them a link to here in the report.
– goldilocks
May 13 '15 at 00:43
This worked on my Raspbian/Jessie:
sudo systemctl set-default multi-user.target
I can still manually start lightdm via
sudo service lightdm start
or
sudo lightdm
The Debian way to enable or disable services is to use update-rc.d. You can use
update-rc.d lightdm disable
if in fact lightdm is the display manager installed.
If you need to run it once, you can
service lightdm start
update the systemd way to do it is in fact to use systemctl disable like indicated in the other answer
update-rc.d
to make it work with systemd for people used to doing it the old way, but if this is all new to you, you might as well learn the new way -- SysV is now pretty much dead on linux.
– goldilocks
May 11 '15 at 19:41
3 Boot Options
setting in raspi-config toB1 Console
worked fine for me on next reboot. They may have fixed an issue. – patridge Dec 08 '15 at 15:31