[neon/neon-packaging/plasma-remotecontrollers/Neon/unstable] debian: add a udev rule and postinst to add group and users to that group

Carlos De Maine null at kde.org
Wed Jun 4 15:14:06 BST 2025


Git commit a94c77c711bf8cd7151314bd225f80f4ba0bacab by Carlos De Maine.
Committed on 04/06/2025 at 14:14.
Pushed by carlosdem into branch 'Neon/unstable'.

add a udev rule and postinst to add group and users to that group

A  +16   -0    debian/plasma-remotecontrollers.postinst
A  +1    -0    debian/plasma-remotecontrollers.udev

https://invent.kde.org/neon/neon-packaging/plasma-remotecontrollers/-/commit/a94c77c711bf8cd7151314bd225f80f4ba0bacab

diff --git a/debian/plasma-remotecontrollers.postinst b/debian/plasma-remotecontrollers.postinst
new file mode 100644
index 0000000..0ede5fe
--- /dev/null
+++ b/debian/plasma-remotecontrollers.postinst
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -ex
+
+# Check if group exists, if not add it.
+if ! getent group | grep -q ^plasma-bigscreen-uinput:; then
+    echo "Creating group plasma-bigscreen-uinput"
+    addgroup --quiet --system plasma-bigscreen-uinput 2>/dev/null || true
+fi
+
+# Check if user is part of plasma-bigscreen-uinput, if not add them.
+if ! groups | grep -q ^plasma-bigscreen-uinput; then
+    echo "Adding user to group plasma-bigscreen-uinput"
+    usermod -aG plasma-bigscreen-uinput $SUDO_USER
+    exec sg plasma-bigscreen-uinput
+fi
\ No newline at end of file
diff --git a/debian/plasma-remotecontrollers.udev b/debian/plasma-remotecontrollers.udev
new file mode 100644
index 0000000..f31cf9b
--- /dev/null
+++ b/debian/plasma-remotecontrollers.udev
@@ -0,0 +1 @@
+SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="plasma-bigscreen-uinput"


More information about the Neon-commits mailing list