Bug#990047: timeshift: Not possible to browse content of snapshot via the gui

2022-08-27 Thread Ludovic Poujol



Le 04/08/2022 à 23:28, Steve M a écrit :

Ludovic,

Timeshift first uses xdg-open to call the default tool of your desktop
environment as it in turn calls gvfs-open, kde-open, exo-open, gnome-
open, etc. as appropriate. On my Debian desktop with KDE running xdg-
open and kde-open launche Dolphin, but on my Pop_OS laptop xdg_open is
not installed and there is no gvfs-open for some reason.

In the event that xdg_open fails, Timeshift tries in order to launch
nemo, nautilus, thunar, io.elementary.files, pantheon-files, marlin,
and dolphin lastly.

In your case it seems that maybe xdg-open is resulting in "code" being
called due to your Gnome settings. The command `xdg-mime query default
inode/directory` should report out what the default file browser is set
to. You can also look in ~/.config/mimeapps.list to see what it is set
to. I think you can just edit this file or run a command similar to
`xdg-mime default org.gnome.Nautilus.desktop inode/directory` to make a
change.

Please let me know how this works out as it may be worth asking
upstream for a more robust means of opening the default file manager.

Thanks
-Steve


Steeve,

Okay. I see the catch!

The command `xdg-mime query default inode/directory` returns
org.gnome.Nautilus.desktop (as expected) when I run it as my user.

But, as Timeshift runs as root, if I run the same xdg-mime command as
root I get `code.desktop` :(

root doesn't have any `~/.config/mimeapps.list file`. And it sure won't
use the settings I have in my account.
After purging the VSCode package, the xdg-mime returns
org.gnome.Nautilus.desktop as one would expect.

As root, `xdg-mime default org.gnome.Nautilus.desktop inode/directory`
creates the cat ~/.config/mimeapps.list enforcing nautilus as the
default application. Fixing the behaviour when VSCode is installed.


A diff of my /etc folder after VSCode install show this change brought
by the package. Adding VSCode for inode/directory if I understand it
properly :

```
diff --git a/mailcap b/mailcap
index 7167022..2d64e78 100644
--- a/mailcap
+++ b/mailcap
@@ -84,6 +84,10 @@ application/xhtml_xml; /usr/bin/chromium %s; test=test -n 
"$DISPLAY"
 application/x-mimearchive; /usr/bin/chromium %s; test=test -n "$DISPLAY"
 x-scheme-handler/http; /usr/bin/chromium %s; test=test -n "$DISPLAY"
 x-scheme-handler/https; /usr/bin/chromium %s; test=test -n "$DISPLAY"
+x-scheme-handler/vscode; /usr/share/code/code --open-url %s; test=test -n 
"$DISPLAY"
+text/plain; /usr/share/code/code --new-window %s; test=test -n "$DISPLAY"
+inode/directory; /usr/share/code/code --new-window %s; test=test -n "$DISPLAY"
+application/x-code-workspace; /usr/share/code/code --new-window %s; test=test -n 
"$DISPLAY"
 application/vnd.iccprofile; /usr/bin/gcm-import %s; test=test -n "$DISPLAY"
 application/pkcs12; /usr/bin/gcr-viewer %s; test=test -n "$DISPLAY"
 application/pkcs12+pem; /usr/bin/gcr-viewer %s; test=test -n "$DISPLAY"
```

So, I guess that Timeshift does it right. And it's VSCode causing trouble to 
the party.

--
Ludovic Poujol



Bug#990047: timeshift: Not possible to browse content of snapshot via the gui

2022-08-01 Thread Ludovic Poujol

Steeve,

Good question. And, you're right, thanks !

I thought it was some kind of "internal browser" provided with 
timeshift. But after looking more closely, it was actually trying to 
start VSCode ! :s And it's the one that do not like to be run as root.


Not sure why or how it decided to use it instead of the Gnome file 
browser. But apt remove of it "fixed" the issue.


I don't see any settings for that in the timeshift GUI. I'm not sure how 
I can force it to use the default gnome file browser :(



Thanks

--
Ludovic Poujol



Bug#990047: timeshift: Not possible to browse content of snapshot via the gui

2021-06-18 Thread Ludovic Poujol

Package: timeshift
Version: 20.11.1-1
Severity: important

Dear Maintainer,

By using timeshift GUI (timeshift-gtk), it's not possible to browse
the content of the snapshot.

Steps to reproduce :

* Configure timeshift (I'm using BTRFS Snapshot)
* Create a snapshot
* Select the snapshot and click on the "Browse" button, to see the 
content of the snapshot


-> Nothing happen while I expected to be able to see the files and 
directories of the snapshot.



I catched the following error message when I started the program from 
gnome-terminal right after clicking on the "Browse" button


[6516:0618/191255.550851:FATAL:electron_main_delegate.cc(263)] Running 
as root

without --no-sandbox is not supported. See https://crbug.com/638180.
Trace/breakpoint trap


Good day,

-- System Information:
Debian Release: 11.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-7-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not
set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages timeshift depends on:
ii  libc62.31-12
ii  libcairo21.16.0-5
ii  libgdk-pixbuf-2.0-0  2.42.2+dfsg-1
ii  libgee-0.8-2 0.20.4-1
ii  libglib2.0-0 2.66.8-1
ii  libgtk-3-0   3.24.24-4
ii  libjson-glib-1.0-0   1.6.2-1
ii  libvte-2.91-00.62.3-1
ii  psmisc   23.4-2
ii  rsync3.2.3-4

timeshift recommends no packages.

--
Ludovic Poujol
Tel (Silence/Signal) : +33 6 25 34 21 10
Matrix : @lpou...@aime.lesmatric.es