Back to the main site

[solved] Can't browse game's files with thunar - it opens it in VLC

Hi, I’ve used to have dolphin file explorer but now I’m using thunar and the thing is that every time in every game when i click browse files lutris opens them in VLC for some reason. I’ve changed my default file explorer to Thunar. I don’t have dolphin on my system, but when I install it and then click on browse files then it all works (but from dolphin). I don’t know how to make it work with thunar. Can anybody help me?
my lutris --submit-issue here: https://paste.ubuntu.com/p/4GzxSPNKg2/
my lutris -d here: https://paste.ubuntu.com/p/WgCrkPN84P/

Interesting behavior.

Translated the message is: traversing vlc with the default interface. Use ‘cvlc’ to use vlc without an interface.

When I tried doing this Lutris opened cola (a git manager).

Then I started Lutris from a console and it promptly opened dolphin.

Tested with Lutris 0.5.4.

Is dolphin your default file explorer?

Yes. Running Fedora KDE spin and it works when I start Lutris from a console.

Weird this.

edit:

Investigated this a bit further.

TL;DR:

I got it working by going to my KDE System Settings / Applications / Default Applications.

There is an entry called Default Applications which among others lists File Manager.

Under this entry I have a list of applications Cola is there, at the top is Dolphin, which is selected.

I changed to another and back to Dolphin and hit Apply. That worked instantly.

Thus a simple matter of re-applying the settings?


How I got there

I went to the source code and searched through it for the text Browse files.

I found it in [source-root]/lutris/game_actions.py line 81. It has a call to the following function:

self.on_browse_files

This method is part of the same class, in the same file, line 243:

def on_browse_files(self, _widget):
        """Callback to open a game folder in the file browser"""
        path = self.game.get_browse_dir()
        if not path:
            dialogs.NoticeDialog("This game has no installation directory")
        elif path_exists(path):
            open_uri("file://%s" % path)
        else:
            dialogs.NoticeDialog("Can't open %s \nThe folder doesn't exist." % path)

The interesting call is this one:

open_uri("file://%s" % path)

This method can be found in [source-root]/lutris/gui/widgets/utils.py, line 46:

Gtk.show_uri(None, uri, Gdk.CURRENT_TIME)

And that is a standard Gtk function to open an Uri (URL formatted location), thus file://....

That told me that the system is the place where this is governed.

1 Like

in my default settings I’ve got selected thunar, but there was “alternative option” that was saying “dolphin %f” with broken icon. I’ve changed that to “thunar” and now I have 2 Thunars in default file explorer settings, but the problem went away. Thank you tfk
[SOLVED]

It happened again
Przechwycenie%20obrazu%20ekranu_2020-03-19_02-19-17
default file explorer is set to thunar, but lutris is opening all files in VLC. But now even installing dolphin doesn’t work.

One thing which pops up.

Did you run Lutris via the runner at the top of your screen? I’ve got an issue with the runner lately that when I start something from the runner the default (ugly) Qt theme is used and not my nice and glossy dark theme.

When I start the same app from the menu everything is ok.

Could it be that also the KDE settings aren’t reached because of this bug?

More likely than not, the source of the problem is MIME and URL handler settings.

1 Like

yup. MIME was the problem. Despite the fact that default file explorer was set to thunar, MIME was set to open files via VLC. Now it’s all working again (for now). Thank you all folks, have a nice day.