Disabling systemd in Debian 9


Systemd can be disabled in Debian 9 by installing sysvinit-core:
apt-get install sysvinit-core
A message from APT will appear, saying the installation has not completed. This is expected. Reboot to complete the installation, after which systemd can be removed:
apt-get remove --purge --autoremove systemd

To make sure systemd doesn't get re-installed in future updates, apt-pinning can be used. Create the file:
which needs to contain the following lines:
Package: systemd
Pin: release
Pin-Priority: -1

Those of a more paranoid disposition may prefer the following:
Package: *systemd*
Pin: release
Pin-Priority: -1
That will ensure that no package with 'systemd' in the name will get installed, but that includes libsystemd0 which is still required for compatibility with packages that expect systemd to be present. If libsystemd0 needs to be upgraded at any point you'll have to change that temporarily to allow it.

Configuring X

In Debian 9 only root will be able to start X by default when using sysvinit. The workaround is to install the xserver-xorg-legacy package, which sets up a setuid root wrapper allowing non-root users to start X:
apt-get install xserver-xorg-legacy
It may be necessary to add the following line to /etc/X11/Xwrapper.config:
The 'startx' command should now work for normal users.

Note that dbus is not needed to run X without systemd.

Index               Contact

Last updated September 22 2017