teejee2008 / timeshift

System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.
GNU Lesser General Public License v3.0
4.7k stars 282 forks source link

Browse backup opens "Azure Data Studio" as root instead for file manager #580

Open paaland opened 4 years ago

paaland commented 4 years ago

Describe the bug Clicking "browse" on a backup opens Azure Data Studio application as root.

To Reproduce Steps to reproduce the behavior:

  1. Open Timeshift
  2. Rigkt click on a backup and select "Browse Files"
  3. Azure Data Studio opens instead for file manager

Expected behavior File manager should open instead.

System:

StevenMapes commented 3 years ago

Also happens on Kubuntu 18.04 with v 19.08 of Timeshift

robbie888 commented 3 years ago

This occurs because timeshift is run as root, and root doesn't have the mime configuration/association for inode/directory. This is normal, because you usually don't (and probably shouldn't) login to your desktop environment as root.

A workaround is to create the file /root/.local/share/applications/defaults.list. This file can define the inode/directory setting that timeshift is calling. My defaults.list file contains the following two lines: inode/directory=nemo.desktop x-directory/normal=nemo.desktop

You will need to adjust the file contents to suit your desktop environment (or file manager), just run $ xdg-mime query default inode/directory as your normal user account to get the value your desktop environment uses. In my case it was nemo.desktop.

After making the above file the browse function worked as expected for me. I'm using Cinnamon on Fedora.