Skip to content

Commit

Permalink
Simplify launch via pkexec
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
mikhailnov committed Mar 17, 2020
1 parent cecd294 commit 041d3ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/timeshift-launcher
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 041d3ee

Please sign in to comment.