Timeshift GUI won't open anymore

Hi all,

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

still works normally.

This is normal behaviour and has nothing to do with updates or whatever.

sudo timeshift --help

and you can remotely restore create or whatever you want to do with timeshift.

1 Like

The command in terminal should be:
(without sudo)
because that script will take care of the authentication
or leave you with a message telling why it didn’t work.

sudo timeshift
which, I guess, will achieve the same result.

1 Like

Timeshift GUI does not open at all in start menu launcher.

I tried it but same result:

$ timeshift-launcher

(timeshift-gtk:180976): Gtk-WARNING **: 09:55:44.052: cannot open display: 

I am not remotely logged in

less /usr/bin/timeshift-launcher
shows the script

It differentiates between whether you are under wayland or “normal” Xorg.
And pkexec is used.

Maybe review what those are and what they might have changed.

I have no further ideas because I do not really understand what the script does or is supposed to do and how and why it may fail to open a display.

1 Like

Thank you. This is the script, could the problem be pkexec?

#!/usr/bin/env bash


if [ "$(id -u)" -eq 0 ]; then
	# user is admin
	# user is not admin
	if echo $- | grep "i" >/dev/null 2>&1; then
		# script is running in interactive mode
		su - -c "${app_command}"
		# script is running in non-interactive mode
		if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
			xhost +SI:localuser:root
			pkexec ${app_command}
			xhost -SI:localuser:root
		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}'"
			x-terminal-emulator -e "echo 'Command must be run as root user: ${app_command}'"

I know - but as I said:
I do not understand it!

Apparently it gets stuck somewhere here:

because your error message says:

I really cannot help - I just know that I’m NOT using wayland,
so, for me, the script will never enter this part of the code,

and that I do not know where the “localuser” in this command comes from

and I know that it works flawlessly for me.

This error “cannot open display:” seems to originate there.

1 Like

I am using Wayland, but currently don’t have Timeshift installed. I’m happy to do this to check it out, however.

As a first step, assuming not already tested, does it work if you switch to an X-session?

sudo pacman -Syu timeshift timeshift-autosnap
results in these packages being pulled in:

Packages (5) libgnomekbd-1:3.28.1-1 libxklavier-5.4-5 xapp-2.8.2-1 timeshift-24.01.1-1 timeshift-autosnap-manjaro-0.10-1

Note that timeshift-autosnap doesn’t add any extra packages to the initial four … the clue there might be xapp-2.8.2-1 …?

I’m about to test this to see what happens .

Virgin installation of Timeshift (no prior settings/configs to confuse things):

  • no GUI launch on Wayland.

This is one of my “production” machines so I’ll test this again in VirtualBox with Plasma6 in both Wayland and X-session modes later.

1 Like

Wayland still has a lot of bugs… it will get better after time.
But right now, its not a good experience.

When you changed to much differend settings you never will know where your issue is related.

Its worth it to start your most used application’s after right after every bigger release update.

Maybe uninstall the optional packages and try out again. :man_shrugging:

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:

1 Like