From 2d39ace79b79a1672488e09bdcf442ff893cbf98 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 21 Nov 2015 17:47:00 +0100 Subject: [PATCH] WIP: xfce-session: Fix shutdown/reboot via menu. --- gnu/packages/xfce.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm index a4987c1..4c223d7 100644 --- a/gnu/packages/xfce.scm +++ b/gnu/packages/xfce.scm @@ -35,6 +35,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages gnome) #:use-module (gnu packages pdf) + #:use-module (gnu packages polkit) #:use-module (gnu packages gstreamer) #:use-module (gnu packages linux) #:use-module (gnu packages photo) @@ -429,13 +430,29 @@ your system in categories, so you can quickly find and launch them.") (list (search-patch "xfce4-session-fix-xflock4.patch"))))) (build-system gnu-build-system) (arguments - '(#:configure-flags + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-paths-to-shutdown-tools + (lambda _ + ;; FIXME: also replace paths to "pm-hibernate" and "pm-suspend" + (substitute* "xfsm-shutdown-helper/main.c" + (("/sbin/shutdown -h now") + "/run/current-system/profile/sbin/halt") + (("/sbin/shutdown -r now") + "/run/current-system/profile/sbin/restart")) + ;; TODO: should we use a store reference to polkit instead? + (substitute* "xfce4-session/xfsm-shutdown-fallback.c" + (("pkexec ") "/run/setuid-programs/pkexec ")) + #t))) + #:configure-flags (list (string-append "--with-xsession-prefix=" %output)))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) (inputs `(("iceauth" ,iceauth) + ("upower" ,upower) + ("polkit" ,polkit) ("libsm" ,libsm) ("libwnck" ,libwnck-1) ("libxfce4ui" ,libxfce4ui))) -- 2.5.0