mako: route D-Bus activation through mako.service
The D-Bus activation file shipped by mako has no SystemdService= line, so dbus execs mako directly when a notification arrives before the compositor is up. mako then dies with "failed to create display", repeatedly, and the notification is lost. nixpkgs installs the upstream contrib systemd unit, which has Type=dbus, After=graphical-session.target and an ExecCondition on WAYLAND_DISPLAY. Point the activation file at it so early notifications wait for the session instead of failing. Upstream mako cannot do this unconditionally because meson does not install the contrib unit.
This commit is contained in:
@@ -70,6 +70,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substitute $src/contrib/systemd/mako.service $out/lib/systemd/user/mako.service \
|
||||
--replace-fail '/usr/bin' "$out/bin"
|
||||
chmod 0644 $out/lib/systemd/user/mako.service
|
||||
|
||||
# Route D-Bus activation through the unit installed above, so it
|
||||
# waits for graphical-session.target instead of exec'ing mako
|
||||
# before the compositor is up.
|
||||
echo "SystemdService=mako.service" \
|
||||
>> $out/share/dbus-1/services/fr.emersion.mako.service
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user