Running Plasma, Wayland and openRC together isn’t as simple as you may expect by now, however, with a little bit of tweaking it is possible nonetheless.
Before we delve into the specifics of how to make such a set up even work, here’s a bit of background regarding some of the aforementioned components and their integration.
OpenRC, as you may or may not know, is a flexible init system mainly developed and maintained by Gentoo developers, having a relatively small number of Linux and BSD distributions utilizing it by default.
Wayland is the next generation display server developed by the freedesktop.org project together with the X.Org Foundation (developers of the current Xorg display server) and others as well.
If this sounds confusing to you, the important thing you should take from the above is that; openRC isn’t too common of a component of the Linux ecosystem, and Wayland is the consensus display server everyone agree to move forward to.
Now why is that important? It’s important because when it comes to standards most every developer is focusing on the larger crowd-base, that is systemd init in this case rather than openRC, which currently has poor integration when it comes to modern desktop environments. For instance GNOME 3 is known to target systemd as a default init system, while KDE mostly managed to stay indifferent to whichever init system you may run. But with Wayland stepping into the fore, that seems to be changing, at least temporarily if not permanently.
Having said that, where there’s a will there’s a way – as the saying goes, so here’s what one needs to do in order to get Plasma, Wayland and openRC to play along.
Making It Work
The obvious requirements you must pass in order to get Plasma, Wayland and openRC to work together is to have the packages installed on your system support Wayland, that might be the default if you’re on a binary based distro, however a source based distro e.g. a Gentoo user, may need to compile all packages with wayland use-flag.
A Gentoo user specifically may also need to compile all packages with ‘egl‘ or ‘gles2‘ use-flag, the package manager would alert you about it if needed.
Next, depending on your distribution you may need to install a package called ‘qtwayland‘ – it might be already installed, or it may have a different name – all depends on your Linux distro.
It’d probably be a good idea to install another package named ‘wayland-integration‘ as it provides integration plugins for various KDE frameworks for Wayland.
Lastly, another requirement which is basically specific to non-systemd users, i.e. to openRC users, is the logind component which is part of systemd (apparently, Plasma relies on this component to run on Wayland). On Gentoo, there’s a package called ‘elogind‘ which is systemd’s logind component extracted from it. You’ll need to have elogind integrated to ‘polkit’ package so make sure you have the right polkit version that supports elogind integration and install elogind.
Now that you have all the relevant packages, there are a couple of configurations you need to make, granted you don’t have systemd installed.
/usr/share/dbus-1/system-services/org.freedesktop.login1.service file thus:
Exec=/bin/bash -c "[[ ! -d /run/systemd ]] && mkdir /run/systemd; /usr/libexec/elogind/elogind"
2. Add the following to
/etc/pam.d/system-login if you’re using ‘SDDM’ display manager and you wish to start a Wayland session through it.
session optional pam_elogind.so
That’s it. Note that you’ll need to reboot and have elogind service running in order for this setup to work.
To run Plasma-Wayland session, either select Plasma (Wayland) from SDDM Desktop Session menu, or switch into a tty (virtual console) > log-in and issue the following commands:
$: export $(dbus-launch)