Merge pull request #57620 from worldofpeace/gnome-brightness-fix
gnome3.gnome-settings-daemon: fix #14168
This commit is contained in:
commit
44bf322dfb
@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
|
||||
src = ./fix-paths.patch;
|
||||
inherit tzdata mousetweaks;
|
||||
})
|
||||
./global-backlight-helper.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -94,6 +95,12 @@ stdenv.mkDerivation rec {
|
||||
"-Dudev_dir=${placeholder "out"}/lib/udev"
|
||||
];
|
||||
|
||||
# So the polkit policy can reference /run/current-system/sw/bin/gnome-settings-daemon/gsd-backlight-helper
|
||||
postFixup = ''
|
||||
mkdir -p $out/bin/gnome-settings-daemon
|
||||
ln -s $out/libexec/gsd-backlight-helper $out/bin/gnome-settings-daemon/gsd-backlight-helper
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
for f in gnome-settings-daemon/codegen.py plugins/power/gsd-power-constants-update.pl meson_post_install.py; do
|
||||
chmod +x $f
|
||||
|
@ -0,0 +1,26 @@
|
||||
diff --git a/plugins/power/gsd-backlight.c b/plugins/power/gsd-backlight.c
|
||||
index d7d10fd2..5619d6ad 100644
|
||||
--- a/plugins/power/gsd-backlight.c
|
||||
+++ b/plugins/power/gsd-backlight.c
|
||||
@@ -358,7 +358,7 @@ gsd_backlight_run_set_helper (GsdBacklight *backlight, GTask *task)
|
||||
proc = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_SILENCE,
|
||||
&error,
|
||||
"pkexec",
|
||||
- LIBEXECDIR "/gsd-backlight-helper",
|
||||
+ "/run/current-system/sw/bin/gnome-settings-daemon/gsd-backlight-helper",
|
||||
g_udev_device_get_sysfs_path (backlight->udev_device),
|
||||
data->value_str, NULL);
|
||||
} else {
|
||||
diff --git a/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in
|
||||
index f16300f8..79d6bd17 100644
|
||||
--- a/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in
|
||||
+++ b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in
|
||||
@@ -25,7 +25,7 @@
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
- <annotate key="org.freedesktop.policykit.exec.path">@libexecdir@/gsd-backlight-helper</annotate>
|
||||
+ <annotate key="org.freedesktop.policykit.exec.path">/run/current-system/sw/bin/gnome-settings-daemon/gsd-backlight-helper</annotate>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
Loading…
Reference in New Issue
Block a user