about summary refs log tree commit diff
path: root/pkgs/applications/backup/timeshift/timeshift-launcher.patch
diff options
context:
space:
mode:
authorShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2020-12-06 04:53:05 +0000
committerShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2022-06-07 22:28:24 +0800
commitc7cb6f953936d06ff34a9ce12aa3cfba42edc242 (patch)
treeb238bcf5853441543df9ecd47da33d02205a983f /pkgs/applications/backup/timeshift/timeshift-launcher.patch
parent6042a2221e782a51ce2d4b38106e99cbf3b6c937 (diff)
timeshift: init at 22.06.1
Diffstat (limited to 'pkgs/applications/backup/timeshift/timeshift-launcher.patch')
-rw-r--r--pkgs/applications/backup/timeshift/timeshift-launcher.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/applications/backup/timeshift/timeshift-launcher.patch b/pkgs/applications/backup/timeshift/timeshift-launcher.patch
new file mode 100644
index 0000000000000..765c101e1629b
--- /dev/null
+++ b/pkgs/applications/backup/timeshift/timeshift-launcher.patch
@@ -0,0 +1,26 @@
+diff --git a/src/timeshift-launcher b/src/timeshift-launcher
+index 29b8fc4..5f6cb17 100755
+--- a/src/timeshift-launcher
++++ b/src/timeshift-launcher
+@@ -1,6 +1,6 @@
+ #!/bin/bash
+ 
+-app_command='timeshift-gtk'
++app_command=''"$(realpath "$(dirname "$0")")"'/timeshift-gtk'
+ 
+ if [ "$(id -u)" -eq 0 ]; then
+ 	# user is admin
+@@ -14,11 +14,11 @@ else
+ 		# script is running in non-interactive mode
+ 		if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
+ 			xhost +SI:localuser:root
+-			pkexec ${app_command}
++			pkexec env DISPLAY="$DISPLAY" XAUTHORITY="$XAUTHORITY" "${app_command}"
+ 			xhost -SI:localuser:root
+ 			xhost
+ 		elif command -v pkexec >/dev/null 2>&1; then
+-			pkexec ${app_command}
++			pkexec env DISPLAY="$DISPLAY" XAUTHORITY="$XAUTHORITY" "${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