GNOME Bugzilla – Bug 638938
gnome-disk-utility: file browser is hard-coded to nautilus instead of using xdg-open
Last modified: 2012-11-12 22:14:44 UTC
As reported downstream by a xfce user that wouldn't like to have to install nautilus for this: http://bugs.gentoo.org/show_bug.cgi?id=350919 Looks like g-d-u is hardcoded to nautilus instead of trying to use alternatives. This is probably related with they following I found in src/palimpsest/gdu-section-volumes.c: static void on_fs_mount_point_element_activated (GduDetailsElement *element, const gchar *uri, gpointer user_data) { GduSectionVolumes *section = GDU_SECTION_VOLUMES (user_data); GError *error; gchar *s; /* We want to use nautilus instead of gtk_show_uri() because * the latter doesn't handle automatically mounting the mount * - maybe gtk_show_uri() should do that though... */ s = g_strdup_printf ("nautilus \"%s\"", uri); error = NULL; if (!g_spawn_command_line_async (s, &error)) { GtkWidget *dialog; dialog = gdu_error_dialog_new (GTK_WINDOW (gdu_shell_get_toplevel (gdu_section_get_shell (GDU_SECTION (section)))), gdu_section_get_presentable (GDU_SECTION (section)), _("Error spawning nautilus: %s"), error); gtk_widget_show_all (dialog); gtk_window_present (GTK_WINDOW (dialog)); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); g_error_free (error); } g_free (s); } But maybe this situation can be improved :-/ Thanks a lot
I'm not sure I see the need for a workaround like this here. gtk_show_uri() may not automatically mount the location but nautilus and thunar both do. In general, I'd say that any app trying to access a location without checking if it is mounted first is broken. Also, I think the point of gtk_show_uri() actually is that you can throw any URI at it and don't have to worry about whether it is already mounted or not. So why not just use it instead of hard-coding an executable that is only present in a single desktop environment?
As of gnome-disk-utility 3.4 everything was rewritten to use udisks2 and GDBus. Looks like we're just relying on GTK+ to open file:/// URIs encoded in GtkLabel markup. Closing as FIXED.