Cannot browse Timeshift snapshots

you edited again

Timeshift does open, but I am unable to hit ‘browse’ and see the timeshift folders in dolphin as before…

I can.
Again … the launcher is broken.
So in order to test we want to use an augmented string instead:

So…

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY timeshift-gtk

what does that do ?

Looks normal up to ‘/dev/sdc1 is mounted…’

Then I hit ‘browse files’

Summary

❯ pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY timeshift-gtk
[Warning] Deleted invalid lock
App config loaded: /etc/timeshift/timeshift.json

/dev/sdc1 is mounted at: /run/timeshift/backup, options: rw,relatime

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
“Session bus not found\nTo circumvent this problem try the following command (with Linux and bash)\nexport $(dbus-launch)”

Hm … maybe do you not have dbus running?

systemctl | grep dbus

Or maybe it is launched funny? That error is not present here.

❯ systemctl | grep dbus
dbus.service loaded active running D-Bus System Message Bus
dbus.socket loaded

I’m going to create a new user and look at that…

5 minutes later - no progress, not a ‘user’ issue. I want also to look at a fresh session from a liveUSB.

Exactly the same issue - however, I’m sure I could previously hit the BROWSE button in timeshift and get dolphin up.

So now I have 2 workarounds, 1. Timeshift is in places in Dolphin and 2. Thunar can be run as root - though I tend to avoid this since leaving Mint Cinnamon last year (generally I never need to, it’s just weird that there’s a ‘browse’ button and I don’t know how to set ‘Thunar’ as the default browser for the root user.

This issue is specific to Linux distributions that restrict the file manager from running as root. You will have to open a file manager as root and browse to the location where snapshots are stored. There’s no easy fix for this issue

1 Like

Its funny … mine does work though …

I wonder if it has anything to do with this still being around
(I forgot about it)

1 Like

What is weird is that it doesn’t need root privilege to access Timeshift snapshot folder it is publicly available to all users on my system, still the browse button in Timeshift does indeed nothing when clicked (KDE here too) with similar terminal output.

[omano@omano-nvme ~]$ timeshift-launcher   
[Warning] Deleted invalid lock
App config loaded: /etc/timeshift/timeshift.json

/dev/nvme0n1p2 is mounted at: /run/timeshift/backup, options: rw,relatime

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
"Session bus not found\nTo circumvent this problem try the following command (with Linux and bash)\nexport $(dbus-launch)"

@Yochanan quoting Github

I don’t get it. The issue is that the file manager is rectricted to run as root, so the solution is to run it as root? How does this make sense?

Indeed. I’m using Xfce w/Thunar file manager, my snapshots are stored on an external HDD. I don’t need root privilege either to browse my snapshots folders. Timeshift’s “browse” button works for me, I’m just trying to make sense of this “browse as root” thing…

Basically you shouldnt … but in most cases you can.
Whereas dolphin actively blocks it.
(DONT DO THIS, but sudo thunar works, sudo dolphin does not)

Back to timeshift…
See this is /usr/bin/timeshift-launcher:
https://clbin.com/reIt2

Which, if user is not admin, will try a few things one after the other … first check for wayland and do stuff that way … if not wayland then try pkexec timeshift-gtk … if that isnt possible it then tries some versions of sudo timeshift-gtk and eventually if none of that works … it asks you to run it as root.
(this is why the launcher should be used, not timeshift-gtk itself)

Thing is … this is broken a few ways.
It seems it is less apparent in scenarios where there arent safeguards against incorrectly using sudo like that.

Q - “Why is using sudo that way incorrect?”
A - Its a long story … but suffice to say its insecure and can easily lead to breakage. There are multiple posts and articles and such on the subject. GUI applications should not be run with sudo.

1 Like

I understand why GUI apps should not be ran with root privilege.
I understand that Timeshift needs root privilege to be able to backup/restore system files/folders.

I was asking why would Timeshift need to launch a file browser as root to browse the snapshots, because they can be browsed as a user.

1 Like

I could quote myself again… :stuck_out_tongue_winking_eye:

… but in all fairness its possible they mean to fix this at some point and are very far behind?

1 Like

Oh! Alright then :slight_smile: Thanks.

Ohp I see it.

Some discussion and how the app is in a less-maintained state
(and hundreds of open issues)

1 Like

Okay - maybe it’s my brain making up false memories about browsing like that before. Mostly I head for Dolphin and open different Timeshift snapshots in tabs when I want to find something to restore - most recently it was the ‘right’ config for Shortwave and something I wanted to look at in my ‘easystroke’ config from a couple of months back.

Then, if it’s a root property there are two choices - for text files it’s no problem because ‘code’ behaves well. I used PCManFM in the past, but prefer Thunar.

It got to be a headache recently after changing my SSD - I was unable to restore using Timeshift because I had also removed partitions hooked in for the hibernate option as I set it to wake from sleep and hibernate after a few hours. In the end I simply ignored it, restored my /home and did a cleaner job. Next time I won’t be lazy - it’s a job for Clonezilla.

This leads to my next question - is there any way to set Thunar as a default root file manager - so that if I hit the ‘browse’ in Timeshift it won’t try to call up Dolphin?

You could try to define Thunar as default File Manager system wide, I’m aware that’s not exactly what you want.

See Bad file explorer in Kubuntu 18.04 · Issue #219 · teejee2008/timeshift · GitHub

The deeper issue still remains that a GUI app should not run with elevated privileges, so there shouldn’t be a GUI root file manager at all.