Timeshift: Browse Files is starting Audacious, not file browser

Created on 3 May 2018  路  11Comments  路  Source: teejee2008/timeshift

Is it normal that hitting the browse button at a snapshot Audacious is starting istead of a file browser?
Where can I configure what browser is starting if I want to browse the snapshot files?

Thank you in advance

dekagon1964

question

Most helpful comment

I had the same problem on Lubuntu: Pressing the browse button opens Audacious.
The reason is that xdg-open is not really meant be used by the root account. Root is no
desktop user.

Timeshift runs under the root account and xdg-open finds no .desktop file for mime type
inode/directory, because the root account has no .desktop files at all.
xdg-open then defaults to /usr/share/applications/defaults.list which
happens to be the unmodified "gnome" list in Lubuntu, containing the following line:
inode/directory=nautilus-folder-handler.desktop

But on Lubuntu the nautilus-folder-handler.desktop item does not exist.
Lubuntu does not use nautilus.
Apparently the system then takes the first application that has inode/directory in
its accepted mime types, in my case Audacious.

The problem could be solved for Lubuntu by changing the offending line in
/usr/share/applications/defaults.list to:
inode/directory=pcmanfm.desktop
but I am not sure if that survives possible updates of the system.

A better solution is to add a new defaults.list file to the root account:
/root/.local/share/appplications/defaults.list
containing only these two lines:

inode/directory=pcmanfm.desktop
x-directory/normal=pcmanfm.desktop

All 11 comments

Looks like folders are configured to open with Audacious on your system. You need to fix that. Check on Google about how to change file association for inode/directory.

I had the same problem on Lubuntu: Pressing the browse button opens Audacious.
The reason is that xdg-open is not really meant be used by the root account. Root is no
desktop user.

Timeshift runs under the root account and xdg-open finds no .desktop file for mime type
inode/directory, because the root account has no .desktop files at all.
xdg-open then defaults to /usr/share/applications/defaults.list which
happens to be the unmodified "gnome" list in Lubuntu, containing the following line:
inode/directory=nautilus-folder-handler.desktop

But on Lubuntu the nautilus-folder-handler.desktop item does not exist.
Lubuntu does not use nautilus.
Apparently the system then takes the first application that has inode/directory in
its accepted mime types, in my case Audacious.

The problem could be solved for Lubuntu by changing the offending line in
/usr/share/applications/defaults.list to:
inode/directory=pcmanfm.desktop
but I am not sure if that survives possible updates of the system.

A better solution is to add a new defaults.list file to the root account:
/root/.local/share/appplications/defaults.list
containing only these two lines:

inode/directory=pcmanfm.desktop
x-directory/normal=pcmanfm.desktop

@willem179:
Tnx a lot for your detailed description of how to set things right.
I had the same problem with kubuntu (kubuntu 18.04.2 LTS, 32 bit as VM). Audacious opened up an began importing files......

So I installed pcmanfm in addition to the default file-manager.
At first I added /root/.local/share/appplications/defaults.list with the respective lines you provided. Yet this didn麓t work for me.
But after doing your initial suggestion:

The problem could be solved for Lubuntu by changing the offending line in
/usr/share/applications/defaults.list to:
inode/directory=pcmanfm.desktop

I really got it working. Pcmanfm opens up for browsing.

As for

but I am not sure if that survives possible updates of the system.

I can tell you that in my case it did survive an update of the system, even after a kernel update.

Thanks again and greetings
Rosika Schreck

I'm having the same issue on Manjaro/Gnome with the music tag editors Kid3 or easy tag. Is the fix the same, or is it different for my DE? Thanks.

Same problem on Linux Mint 18.3 KDE (based on Ubuntu Xenial), kid3 is opened for me.

Based on the analysis from https://github.com/teejee2008/timeshift/issues/186#issuecomment-403515369, couldn't a better mechanism to browse a snapshot be provided by Timeshift?

I found another reference to a similar problem in the Manjaro users forum. Here's a link, perhaps it will be helpful. I haven't tried a fix yet, but will do so and post the results.
https://forum.manjaro.org/t/how-to-fix-open-containing-folder-association-permanently/20101/5

The above worked for me, at least for the time being in Manjaro
Here's a link of the two files I edited:
https://photos.app.goo.gl/kyRwF8scbHjYYbie6

Manjaro KDE x86_64 

Timeshift dir with snapshoots did not opening at all, for a while Dolphin icon on taskbar is loading, but NOT opening any window. Should I create new issue with it or this is related with #186?

Hello I have same problem with Browse, instead of opening up Dolphin file manager it opens up Visual Code.

Here is my system:

Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-45-generic
OS Type: 64-bit

@Rosika2

Ok so I did what you said except in my case I changed this line.:
inode/directory=org.gnome.Nautilus.desktop
to this
inode/directory=org.kde.dolphin.desktop;org.gnome.Nautilus.desktop
Originally was just Nautilus. Not sure why, I dont have that installed.

Also, when Dolphin opens up, it opens up as root user. But anyway it works! Thanks!

@silocoder:

Hi,
glad it worked for you.
I didn麓t even know that you could provide more than one entry in /usr/share/applications/defaults.list. Interesting.
So basically it麓s the first entry which is taken as the default I suppose?

In my Lubuntu system the respective line is also inode/directory=nautilus-folder-handler.desktop in spite of the fact
that I don麓t have nautilus installed either.

Greetings.
Rosika

Creating the file /root/.local/share/applications/defaults.list was a working solution for me.

You may need to adjust the file contents to suit your desktop environment, 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.

So the defaults.list file contains the following two lines for me:
inode/directory=nemo.desktop
x-directory/normal=nemo.desktop

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MagnusA picture MagnusA  路  3Comments

q2dg picture q2dg  路  15Comments

liberodark picture liberodark  路  6Comments

Areahints picture Areahints  路  7Comments

Dude4Linux picture Dude4Linux  路  6Comments