From 041d3ee24b2f845c57d18633582e30eb5042a508 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Tue, 17 Mar 2020 11:06:05 +0300 Subject: [PATCH] Simplify launch via pkexec - remove usage of env: when timeshift is being launched via pkexec, envs like DISPLAY and XAUTHORITY are inherited from the current envoronment - when they are set explicitly via the binary /usr/bin/env, X server does not permit access, the old method of launching did not work on ROSA KDE 4: > Could not connect to display - when /usr/bin/env is launched, the graphical policykit agent dialog shows that /usr/bin/env is being launched and does not show TimeShift's icon There is no reason to use env, I believe. This patch fixes launching on ROSA. --- src/timeshift-launcher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timeshift-launcher b/src/timeshift-launcher index a6c4e9c..aef6067 100755 --- a/src/timeshift-launcher +++ b/src/timeshift-launcher @@ -18,7 +18,7 @@ else xhost -SI:localuser:root xhost elif command -v pkexec >/dev/null 2>&1; then - pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ${app_command} + pkexec ${app_command} elif command -v sudo >/dev/null 2>&1; then x-terminal-emulator -e "sudo ${app_command}" elif command -v su >/dev/null 2>&1; then