GNOME Bugzilla – Bug 560352
photo import with nautilus does not work
Last modified: 2011-07-05 12:06:36 UTC
When I install gthumb, and plug in my gphoto handled digicam, nautilus gvfs-mounts it, detects that it is a camera, and produces a "What to do with this camera" dialog, which has "browse" (in nautilus), "F-spot" (if installed, due to f-spot-import.desktop), and since the addition of x-content/image-dcf in [1] also "gthumb". However, selecting gthumb doesn't actually work: Instead of the import dialog, it shows the main window, and when choosing the import option from the menu it cannot talk to the camera through libgphoto since nautilus/gvfs already mounted it. So what should happen: * gthumb.desktop shouldn't be responsible for x-content/image-dcf;x-content/image-picturecd;, i. e. [1] should be reverted. This desktop file is for "Open this picture with this application". * There should be a separate gthumb-import.desktop which is responsible for that mime type, but calls gthumb --import-photos instead of gthumb %U (which results in something like "gthumb gphoto2://[usb:001,019]/", which gthumb cannot understand). This desktop file should gvfs-unmount the camera, so that gphoto can talk to it. Alternatively, gthumb can be made gvfs/gio aware and properly parse the gphoto:// URL. However, doing that is very intrusive. I'll prepare a patch for the "gthumb-import.desktop" approach, which is unintrusive and works very well for f-spot. [1] http://svn.gnome.org/viewvc/gthumb/trunk/data/gthumb.desktop.in?r1=1462&r2=2199
Created attachment 122424 [details] [review] Ubuntu patch This patch creates a gthumb-import.desktop like I mentioned, including i18n'ing. Works well for my gphoto camera as well as a mass storage one.
Please add a link to the Ubuntu bug report. The general approach was OK'd by mclasen, so it's OK for both Ubuntu and Fedora. Patch committed to 2-10 branch and trunk. Will appear in 2.10.11. Thanks! - Mike
Thanks, Michael, that was quick! :-) How do I "add a link"? The attached .patch file has one, but I don't see an URL field in bugzilla. I pasted it to the whiteboard now, is that okay?
I just meant add it in a comment. Nothing fancy. https://launchpad.net/bugs/287689 - Mike
Unfortunately GNOME 2.26's gvfs semantics changed, and the original patch does not work any more. Please see https://launchpad.net/bugs/351122 for details. I'll attach a patch which is a bit ugly, but works for now. In the long run, I saw good progress on the "port to GIO" front, this hack will do until then. Thank you!
Created attachment 131935 [details] [review] update for gvfs in GNOME 2.26
Please change status to confirmed. Issue still present in ubuntu jaunty with last updates, ghtumb 3:2.10.11-0ubuntu1
We may need to change the photo importer to import photos from ~/.gvfs mounts directly, if present, and then falling back to libgphoto.
Anyway, closing this bug, since trunk has the "gvfs-mount -u ~/.gvfs/gphoto2*" string. Further work will occur in bug 583796. - Mike
As pointed out in https://bugs.launchpad.net/ubuntu/jaunty/+source/gthumb/+bug/351122, the command should be "gvfs-mount -u ~/.gvfs/*gphoto2*" for internationalization issues. Davide
This is indeed *not fixed* (for the 2.10 branch), i18n really breaks it. The "*gphoto2*" pattern Davide suggests helps e.g. for French ("Montage de gphoto2 sur …") but in some translations it’s "gPhoto2" or "GFoto2" or even "ГФото2" :-/ You might consider these as buggy translations but trying to match a translated string seems to be not robust at all. Shouldn’t "gvfs-mount -u -s gphoto2" work in all cases?
That should work. Do you need the "-u" if the "-s" is present? Can you test it? I don't have 2.10.x available any more. - Mike
Sorry, about the "-u", it is indeed not necessary. I changed the respective line in my /usr/share/applications/gthumb-import.desktop file to Exec=sh -c 'gvfs-mount -s gphoto2; exec gthumb --import-photos' and this works, i.e. the camera is unmounted and the gthumb importer is able to use the camera. I also tested with a French locale, but as expected this doesn't make a difference. I'll post this as a workaround to the Ubuntu bug tracker and ask for some more testing, but I think this is quite save.
I confirm that Marcel's solution fixes the bug for me (Italian locale, Ubuntu 10.04). Thank you Marcel!
this should work properly in version 2.12, since it uses gvfs.