This post shares my experience in replacing systemd by openrc on my debian.
Installation
To make the installation as easy as possible, I booted from a rescue CD, chrooted into my system, and typed
aptitude install openrc
that’s it ! I tried before on virtual machines to update inside a running machine, it proved to be a mistake
The end result
Even without systemd, you will still see some systemd files and applications:
the
udev
binary is actually calledsystemd-udevd
, because udev is now part of systemd. I have nothing against udev, and replacing it seems a bit cumbersome, so I’ll keep it for nowthe
libsystemd0
package is still installed. A few years ago it was possible to replace it withlibelogind0
(ABI compatible) but the newelogind
depends onlibsystemd0
and conflicts withlibelogind0
.
An important thing to note is that getting rid of systemd does not get rid of code written in conjunction with systemd. Typically, udev
is part of systemd, elogind
is a fork of part of systemd
…
In my case, I mostly wanted to get rid of journald
, hostnamed
, resolved
, and socket activations.
A few commands
To know the list of services that are currently run:
rc-status
Start/Stop a service
/etc/init.d/NAME [start|stop]
rc-service NAME [start|stop]
Remove a service from startup
rc-update del NAME
Pipewire
Compare to systemd (and runit), openRC does not come with user services, only root services. There are a few programs that are user services, and one of the most important one is pipewire.
To launch pipewire, 3 applications should be run: pipewire
, pipewire-pulse
and wireplumber
If you use a desktop environment (like KDE or gnome), an easy way to have these programs launched at startup is to create a few XDG files:
root% cat /etc/xdg/autostart/pipewire.desktop
[Desktop Entry]
Name=PipeWire
Comment=Start PipeWire
Icon=pipewire
Exec=pipewire
Terminal=false
Type=Application
NoDisplay=true
root% cat /etc/xdg/autostart/pipewire-pulse.desktop
[Desktop Entry]
Name=PipeWire pulse
Comment=Start PipeWire pulse
Icon=pipewire
Exec=pipewire-pulse
Terminal=false
Type=Application
NoDisplay=true
root% cat /etc/xdg/autostart/wireplumber.desktop
[Desktop Entry]
Name=Wireplumber
Comment=Start Wireplumber
Icon=pipewire
Exec=wireplumber
Terminal=false
Type=Application
NoDisplay=true