gnunn1 / tilix

A tiling terminal emulator for Linux using GTK+ 3
https://gnunn1.github.io/tilix-web
Mozilla Public License 2.0
5.39k stars 294 forks source link

"Show File Browser..." isn't working #1270

Open f2404 opened 6 years ago

f2404 commented 6 years ago

Clicking the menu item results in the following errors printed to the console:

(tilix:10853): GLib-CRITICAL **: g_filename_to_uri: assertion 'filename != NULL' failed

(tilix:10853): Gtk-CRITICAL **: gtk_show_uri: assertion 'uri != NULL' failed
$ tilix -v
Versions
    Tilix version: 1.7.5
    VTE version: 0.44
    GTK Version: 3.20.8

Tilix Special Features
    Notifications enabled=0
    Triggers enabled=0
    Badges enabled=0
alexwhitman commented 6 years ago

Works for me, but I am running a newer build:

$ tilix -v
Versions
    Tilix version: 1.7.6-0.0.1
    VTE version: 0.42
    GTK Version: 3.18.9

Tilix Special Features
    Notifications enabled=0
    Triggers enabled=0
    Badges enabled=0
gnunn1 commented 6 years ago

Tilix uses the gtk_show_uri function and passes it a uri with file://.... If there is a different handler registered with this uri then whatever application is registered against it will be opened instead. I could hard code it to use nautilus but that means it wouldn't work on other platforms or for folks who want to use a different file manager. Suggestions welcome on how to handle this better.

phw commented 6 years ago

This is what I do for Peek:

https://github.com/phw/peek/blob/master/src/desktop-integration.vala

Basically I first try to use the org.freedesktop.FileManager1 DBus service, than I use the default handler for directories and finally xdg-open.

The default handler is a bit more complicated here, since Peek deals with files and tries to highlight them in the file browser, in Tilix case gtk_show_uri should suffice.

But using org.freedesktop.FileManager1 first works pretty well and many DEs support this.

gnunn1 commented 6 years ago

Thanks @phw, I'll have a look.

maoschanz commented 6 years ago

Same issue here

(tilix:11187): GLib-CRITICAL **: 00:30:54.586: g_filename_to_uri: assertion 'filename != NULL' failed

(tilix:11187): Gtk-CRITICAL **: 00:30:54.586: gtk_show_uri: assertion 'uri != NULL' failed
*****@debian:~$ tilix -v
Versions
    Version de Tilix : 1.8.1
    Version de VTE : 0.52
    Version de GTK : 3.22.30

Fonctionnalités spéciales de Tilix
    Notifications activées=0
    Déclencheurs activés=0
    Badges activés=1
jpfleury commented 5 years ago

It doesn't work on Xubuntu 18.10 (and Thunar as my file browser), but I don't have any errors displayed in the terminal.