[neon/neon/settings/Neon/stable] usr/share/polkit-1/rules.d: add polkit rules as per kde packaging recommendations

Carlos De Maine null at kde.org
Sun May 31 03:09:23 BST 2026


Git commit 45e3d9a5001c4c42a07985bb50fd12f77acf4ac1 by Carlos De Maine.
Committed on 31/05/2026 at 02:09.
Pushed by carlosdem into branch 'Neon/stable'.

add polkit rules as per kde packaging recommendations

A  +8    -0    usr/share/polkit-1/rules.d/00-kde-neon-ntp-and-time-zones.rules

A  +8    -0    usr/share/polkit-1/rules.d/00-kde-neon-open-firewall-kcm.rules
A  +7    -0    usr/share/polkit-1/rules.d/00-kde-neon-udisks.rules

https://invent.kde.org/neon/neon/settings/-/commit/45e3d9a5001c4c42a07985bb50fd12f77acf4ac1

diff --git "a/usr/share/polkit-1/rules.d/00-kde-neon-ntp-and-time-zones.rules\n" "b/usr/share/polkit-1/rules.d/00-kde-neon-ntp-and-time-zones.rules\n"
new file mode 100644
index 0000000..30c7926
--- /dev/null
+++ "b/usr/share/polkit-1/rules.d/00-kde-neon-ntp-and-time-zones.rules\n"
@@ -0,0 +1,8 @@
+// Allow current user or their system services to change the system time zone and time
+// synchronization. This effectively fixes https://bugs.kde.org/show_bug.cgi?id=490899
+
+polkit.addRule(function(action, subject) {
+    if ((action.id == "org.freedesktop.timedate1.set-timezone" || action.id == "org.freedesktop.timedate1.set-ntp") && subject.local && subject.active && subject.isInGroup("wheel")) {
+        return polkit.Result.YES;
+    }
+});
diff --git a/usr/share/polkit-1/rules.d/00-kde-neon-open-firewall-kcm.rules b/usr/share/polkit-1/rules.d/00-kde-neon-open-firewall-kcm.rules
new file mode 100644
index 0000000..d0a2ae9
--- /dev/null
+++ b/usr/share/polkit-1/rules.d/00-kde-neon-open-firewall-kcm.rules
@@ -0,0 +1,8 @@
+// Allow current user to open the firewall KCM without being immediately prompted
+// to authenticate.
+
+polkit.addRule(function(action, subject) {
+    if (action.id == "org.kde.ufw.queryapps" && subject.local && subject.active && subject.isInGroup("wheel")) {
+        return polkit.Result.YES;
+    }
+});
diff --git a/usr/share/polkit-1/rules.d/00-kde-neon-udisks.rules b/usr/share/polkit-1/rules.d/00-kde-neon-udisks.rules
new file mode 100644
index 0000000..97e21c3
--- /dev/null
+++ b/usr/share/polkit-1/rules.d/00-kde-neon-udisks.rules
@@ -0,0 +1,7 @@
+// Allow user to mount devices without authentication; anything else is too annoying.
+
+polkit.addRule(function(action, subject) {
+    if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" || action.id == "org.freedesktop.udisks2.filesystem-mount") && subject.local && subject.active) {
+        return polkit.Result.YES;
+    }
+});


More information about the Neon-commits mailing list