mirror of
https://github.com/swaywm/sway.git
synced 2025-02-16 22:34:27 +00:00
Clarify systemd integartion with logging -- running via systemd is discouraged
parent
5b549f4572
commit
e23ef47dd0
|
@ -19,7 +19,7 @@ After=graphical-session-pre.target
|
|||
|
||||
In order for the unit file to work properly, add the following lines to either `/etc/sway/config.d/10-systemd` which will include it in the default config, or add them to the end of the user's config file:
|
||||
|
||||
```
|
||||
```bash
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
```
|
||||
|
||||
|
@ -32,8 +32,18 @@ To walkthrough the stages of how this works:
|
|||
- When sway is run, it will import the environment variables into the systemd user manager and start the sway session target.
|
||||
- The systemd user manager will then start all the services that depend on that target, and will provide them access to the imported env variables.
|
||||
|
||||
## Sway logging and journalctl
|
||||
|
||||
If you'd like sway's output to be handled by journald (like a systemd service), you can used `systemd-cat` for this:
|
||||
```bash
|
||||
exec systemd-cat --identifier=sway sway
|
||||
```
|
||||
|
||||
## Running sway itself as a --user service
|
||||
|
||||
It is not recommended that you run `sway` as a systemd service.
|
||||
See #5160 for finer details on some discussion around this.
|
||||
|
||||
Place the following unit file either at `~/.config/systemd/user/sway.service` or `/etc/systemd/user/sway.service`:
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue