After the last update, and after I installed some optional packages I can’t open timeshift GUI anymore.
When I click the launcher, nothing happens.
When I execute the same command in terminal this happens: $ sudo timeshift-launcher (timeshift-gtk:142613): Gtk-WARNING **: 07:27:42.837: cannot open display:
Why is this happening? I am not remotely logged in using SSH and I am on my own laptop.
I found a work around though: $ sudo timeshift-gtk
The command in terminal should be: timeshift-launcher
(without sudo)
because that script will take care of the authentication
or leave you with a message telling why it didn’t work.
Or: sudo timeshift
which, I guess, will achieve the same result.
Thank you. This is the script, could the problem be pkexec?
#!/usr/bin/env bash
app_command='timeshift-gtk'
if [ "$(id -u)" -eq 0 ]; then
# user is admin
${app_command}
else
# user is not admin
if echo $- | grep "i" >/dev/null 2>&1; then
# script is running in interactive mode
su - -c "${app_command}"
else
# script is running in non-interactive mode
if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
xhost +SI:localuser:root
pkexec ${app_command}
xhost -SI:localuser:root
xhost
elif command -v pkexec >/dev/null 2>&1; then
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
x-terminal-emulator -e "su - -c '${app_command}'"
else
x-terminal-emulator -e "echo 'Command must be run as root user: ${app_command}'"
fi
fi
fi
Timeshift actually works well on Wayland - it’s rather a problem with the launch script as pointed out by @Nachlese . Not sure what changed for @whatthe with his last update, but you can find this in the timeshift repo, with a proposed workaround: