Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350919 - sys-apps/gnome-disk-utility: file browser is hard-coded to nautilus instead of using xdg-open
Summary: sys-apps/gnome-disk-utility: file browser is hard-coded to nautilus instead o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
: 351501 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-07 00:55 UTC by Delan Azabani
Modified: 2011-01-18 01:36 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
screenshot of the error (Screenshot - 010711 - 08:46:31.png,148.44 KB, image/png)
2011-01-07 00:57 UTC, Delan Azabani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Delan Azabani 2011-01-07 00:55:49 UTC
When using palimpsest to view a volume, mounting it, then clicking on the link to the mountpoint shows an error, failing to spawn nautilus. I'm currently running an Xfce environment with very little Gnome programs (gedit and gnome-disk-utility are all that I have).

Reproducible: Always

Steps to Reproduce:
1. mount a volume
2. click on the link after "Mounted at"
Actual Results:  
Error window:
Title: "Error spawning nautilus: %s"
Subtitle: "An error occurred while performing an operation on "RAID Array /dev/md127 (read-auto)" (3.0 TB RAID Array): Unknown error"
Details: "Failed to execute child process "nautilus" (No such file or directory)"

Expected Results:  
The preferred file manager should open, in my case, thunar, with the directory specified.

A simple fix for this bug is to use xdg-open instead of nautilus.
Comment 1 Delan Azabani 2011-01-07 00:57:07 UTC
Created attachment 259106 [details]
screenshot of the error
Comment 2 Pacho Ramos gentoo-dev 2011-01-07 20:59:57 UTC
Looks like it's intentional looking at 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);
}


I think you should open this bug to upstream instead since we will need their approval at first:
http://bugzilla.gnome.org
Comment 3 Pacho Ramos gentoo-dev 2011-01-07 21:04:13 UTC
+  07 Jan 2011; Pacho Ramos <pacho@gentoo.org> gnome-disk-utility-2.32.0.ebuild:
+  gnome-base/nautilus is always required since it's not only used for nautilus
+  extension (bug #350919 by Delan Azabani).

And reported upstream:
https://bugzilla.gnome.org/show_bug.cgi?id=638938
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2011-01-17 15:30:55 UTC
reopen. nautilus is now being pulled in by xfce's and lxde's deptrees, it's not required.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2011-01-17 15:33:15 UTC
and reverted the commit in tree.
Comment 6 Pacho Ramos gentoo-dev 2011-01-17 15:34:34 UTC
*** Bug 351501 has been marked as a duplicate of this bug. ***
Comment 7 Pacho Ramos gentoo-dev 2011-01-17 15:38:07 UTC
Please comment on following suggestions to handle this since I doubt upstream will fix it in the near future:
1. Add a "minimal" USE flag allowing people to skip nautilus installation even having a original problem (comment #0) when clicking on the link to the mountpoint.

2. Use "xdg-open" instead of "nautilus" for src/palimpsest/gdu-section-volumes.c:
>         /* 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);
> 

But, as stated by upstream, you should try to know of nautilus alternatives will "handle automatically mounting the mount"

Thanks for your help
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2011-01-17 15:44:02 UTC
I would prefer option 2. to use xdg-open, but I don't think upstream will accept it because xdg-utils is not maintained, last release is from 2007 or so, propably the only project in whole freedesktop.org not migrated to git yet. We have been shipping CVS snapshots of it, like every other distro do...

But still, all that said, it would be easy to maintain a single line sed in the ebuild. So I'd still choose option 2.

Or put it behind USE=nautilus, behind --enable/--disable-nautilus, if upstream wants to keep using nautilus for palimpsest, let them, just build the app only when nautilus is wanted

Or leave it as is, optional drop in runtime dep, not a big deal -> resolved, wontfix
Comment 9 Pacho Ramos gentoo-dev 2011-01-17 16:10:58 UTC
I would probably choose to use xdg-open but I was doubting since maybe xdg-open behaves as "gtk_show_uri()" (I mean, both don't mount the mount)
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2011-01-17 18:30:10 UTC
+*gnome-disk-utility-2.32.0-r1 (17 Jan 2011)
+
+  17 Jan 2011; Samuli Suominen <ssuominen@gentoo.org>
+  +gnome-disk-utility-2.32.0-r1.ebuild:
+  Use xdg-open instead of nautilus when accessing mountpoint from palimpsest
+  wrt #350919 by Delan Azabani.
Comment 11 Delan Azabani 2011-01-18 01:35:00 UTC
I don't quite understand the need for the file manager to mount the volume on open. The only time when you see the mountpoint link is after you've mounted a volume.
Comment 12 Delan Azabani 2011-01-18 01:36:23 UTC
Oh, whoops. I didn't notice that it was already resolved and changed to xdg-open. Sorry!