Sunshine/packaging/linux/flatpak/scripts/additional-install.sh
istori1 4c1371aaeb
Add install scripts (Flatpak) (#471)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2022-11-18 18:52:58 -05:00

14 lines
585 B
Bash

#!/bin/sh
# User Service
mkdir -p ~/.config/systemd/user
cp /app/share/sunshine/systemd/user/sunshine.service $HOME/.config/systemd/user/sunshine.service
echo Sunshine User Service has been installed.
echo Use [systemctl --user enable sunshine] once to autostart Sunshine on login.
# Udev rule and input group
UDEV=$(cat /app/share/sunshine/udev/rules.d/85-sunshine.rules)
echo Configuring mouse permission.
flatpak-spawn --host pkexec sh -c "usermod -a -G input $USER && echo '$UDEV' > /etc/udev/rules.d/85-sunshine.rules"
echo Restart computer for mouse permission to take effect.