diff --git a/Sway-without-systemd-on-Arch-Linux.md b/Sway-without-systemd-on-Arch-Linux.md new file mode 100644 index 0000000..e4bb51d --- /dev/null +++ b/Sway-without-systemd-on-Arch-Linux.md @@ -0,0 +1,70 @@ +If you run an [Arch Linux based distribution without systemd](https://wiki.parabola.nu/OpenRC), you will need to add the `setuid-bit` and the `cap_sys_tty_config` ([issue 1022](https://github.com/SirCmpwn/sway/issues/1022)) to your `/usr/bin/sway` file, or otherwise it will not start. + +### manually + +These are the commands, that you need to run as *root* after each sway installation/update: + +``` +setcap cap_sys_tty_config=ep /usr/bin/sway +chmod +s /usr/bin/sway +``` + +### automated + +Place the following two [hook](https://www.archlinux.org/pacman/alpm-hooks.5.html) files in `/etc/pacman.d/hooks` (create the folder, if it does not exist). + +`sway-setuid.hook` +``` +[Trigger] +Operation = Install +Type = Package +Target = sway + +[Trigger] +Operation = Upgrade +Type = Package +Target = sway + +[Trigger] +Operation = Install +Type = Package +Target = sway-git + +[Trigger] +Operation = Upgrade +Type = Package +Target = sway-git + +[Action] +Description = Applying setuid-bit to sway +When = PostTransaction +Exec = /usr/bin/chmod +s /usr/bin/sway +``` + +`sway-cap-sys-ttyconfig.hook` +``` +[Trigger] +Operation = Install +Type = Package +Target = sway + +[Trigger] +Operation = Upgrade +Type = Package +Target = sway + +[Trigger] +Operation = Install +Type = Package +Target = sway-git + +[Trigger] +Operation = Upgrade +Type = Package +Target = sway-git + +[Action] +Description = Applying cap_sys_tty_config to sway +When = PostTransaction +Exec = /usr/bin/setcap cap_sys_tty_config=ep /usr/bin/sway +``` \ No newline at end of file