After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638938 - gnome-disk-utility: file browser is hard-coded to nautilus instead of using xdg-open
gnome-disk-utility: file browser is hard-coded to nautilus instead of using x...
Status: RESOLVED FIXED
Product: gnome-disk-utility
Classification: Core
Component: general
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-07 21:03 UTC by Pacho Ramos
Modified: 2012-11-12 22:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pacho Ramos 2011-01-07 21:03:41 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
Comment 1 Jannis Pohlmann 2011-01-17 17:48:49 UTC
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?
Comment 2 David Zeuthen (not reading bugmail) 2012-11-12 22:14:44 UTC
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.