From 5d3034701d9e8e73aba4527fa6e11af2a11ade1e Mon Sep 17 00:00:00 2001 From: kodemeister Date: Sun, 2 Apr 2023 03:48:24 +0600 Subject: [PATCH] Remove setup of 'input' group from Linux packaging scripts --- packaging/linux/AppImage/AppRun | 1 - .../linux/flatpak/scripts/additional-install.sh | 4 ++-- .../flatpak/scripts/remove-additional-install.sh | 4 ++-- src_assets/linux/misc/postinst | 12 ------------ 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packaging/linux/AppImage/AppRun b/packaging/linux/AppImage/AppRun index e9f9f3f7..51b7fa1a 100644 --- a/packaging/linux/AppImage/AppRun +++ b/packaging/linux/AppImage/AppRun @@ -45,7 +45,6 @@ echo " function install() { # user input rules - sudo usermod -a -G input $USER # shellcheck disable=SC2002 cat "$SUNSHINE_SHARE_HERE/udev/rules.d/85-sunshine.rules" | sudo tee /etc/udev/85-sunshine.rules diff --git a/packaging/linux/flatpak/scripts/additional-install.sh b/packaging/linux/flatpak/scripts/additional-install.sh index 43615144..8a905b53 100644 --- a/packaging/linux/flatpak/scripts/additional-install.sh +++ b/packaging/linux/flatpak/scripts/additional-install.sh @@ -6,8 +6,8 @@ cp /app/share/sunshine/systemd/user/sunshine.service $HOME/.config/systemd/user/ 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 rule 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" +flatpak-spawn --host pkexec sh -c "echo '$UDEV' > /etc/udev/rules.d/85-sunshine.rules" echo Restart computer for mouse permission to take effect. diff --git a/packaging/linux/flatpak/scripts/remove-additional-install.sh b/packaging/linux/flatpak/scripts/remove-additional-install.sh index 74cb9505..6148f62e 100644 --- a/packaging/linux/flatpak/scripts/remove-additional-install.sh +++ b/packaging/linux/flatpak/scripts/remove-additional-install.sh @@ -6,6 +6,6 @@ rm $HOME/.config/systemd/user/sunshine.service systemctl --user daemon-reload echo Sunshine User Service has been removed. -# Udev rule and input group -flatpak-spawn --host pkexec sh -c "gpasswd -d $USER input && rm /etc/udev/rules.d/85-sunshine.rules" +# Udev rule +flatpak-spawn --host pkexec sh -c "rm /etc/udev/rules.d/85-sunshine.rules" echo Mouse permission removed. Restart computer to take effect. diff --git a/src_assets/linux/misc/postinst b/src_assets/linux/misc/postinst index da617605..63f0523d 100644 --- a/src_assets/linux/misc/postinst +++ b/src_assets/linux/misc/postinst @@ -1,17 +1,5 @@ #!/bin/sh -export GROUP_INPUT=input - -if [ -f /etc/group ]; then - if ! grep -q $GROUP_INPUT /etc/group; then - echo "Creating group $GROUP_INPUT" - - groupadd $GROUP_INPUT - fi -else - echo "Warning: /etc/group not found" -fi - # Ensure Sunshine can grab images from KMS path_to_setcap=$(which setcap) if [ -x "$path_to_setcap" ] ; then