mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-22 03:02:17 +03:00
690da3a8f4
Miracle now supports running through systemd, including logging to the journal and invoking processes as transient units through systemd-run. This is controlled as a build-time feature in CMake. |
||
---|---|---|
.. | ||
usr | ||
LICENSE.sway-systemd | ||
README.md |
Running miracle as a systemd user session
Most of my understanding about how Wayland compositors interact with systemd is taken from here https://github.com/swaywm/sway/wiki/Systemd-integration and here https://github.com/alebastr/sway-systemd
Miracle offers a standard way of integrating with systemd
that is largely
derived from https://github.com/alebastr/sway-systemd.
Installation
To install miracle with systemd support, simply provide the following option to cmake:
cmake -DSYSTEMD_INTEGRATION=1 ..
View Logs
journalctl --user --identifier miracle-wm
Manual Setup
From the root of the project:
cd session
cp usr/lib/systemd/user/*.target /usr/lib/systemd/user/ # or $XDG_CONFIG_HOME/systemd/user/ or ~/.config/systemd/user
cp usr/bin/libexec/miracle-wm-session-setup /usr/local/libexec/miracle-wm/miracle-wm-session-setup
Then, in /usr/local/bin/miracle-wm-session
(or wherever you have it), you should paste the following:
#!/bin/sh
systemd-cat --identifier=miracle-wm miracle-wm --systemd-session-configure=/usr/local/libexec/miracle-wm/miracle-wm-session-setup
Finally, log out and log back into miracle. Once running, try to run:
echo $XDG_SESSION_DESKTOP # This should be "miracle-wm"