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 560352 - photo import with nautilus does not work
photo import with nautilus does not work
Status: RESOLVED OBSOLETE
Product: gthumb
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks: 583464
 
 
Reported: 2008-11-11 14:40 UTC by Martin Pitt
Modified: 2011-07-05 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ubuntu patch (2.27 KB, patch)
2008-11-11 15:16 UTC, Martin Pitt
committed Details | Review
update for gvfs in GNOME 2.26 (885 bytes, patch)
2009-04-02 18:24 UTC, Martin Pitt
none Details | Review

Description Martin Pitt 2008-11-11 14:40:24 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
Comment 1 Martin Pitt 2008-11-11 15:16:42 UTC
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.
Comment 2 Michael Chudobiak 2008-11-12 16:38:35 UTC
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
Comment 3 Martin Pitt 2008-11-12 16:42:48 UTC
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?
Comment 4 Michael Chudobiak 2008-11-12 16:46:07 UTC
I just meant add it in a comment. Nothing fancy.

https://launchpad.net/bugs/287689

- Mike
Comment 5 Martin Pitt 2009-04-02 18:21:55 UTC
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!
Comment 6 Martin Pitt 2009-04-02 18:24:18 UTC
Created attachment 131935 [details] [review]
update for gvfs in GNOME 2.26
Comment 7 Paolo Benvenuto 2009-05-13 12:05:42 UTC
Please change status to confirmed.

Issue still present in ubuntu jaunty with last updates, ghtumb 3:2.10.11-0ubuntu1

Comment 8 Michael Chudobiak 2009-05-21 15:49:39 UTC
We may need to change the photo importer to import photos from ~/.gvfs mounts directly, if present, and then falling back to libgphoto.
Comment 9 Michael Chudobiak 2009-06-05 13:29:11 UTC
Anyway, closing this bug, since trunk has the "gvfs-mount -u ~/.gvfs/gphoto2*" string.

Further work will occur in bug 583796.

- Mike
Comment 10 Davide Capodaglio 2009-10-30 14:02:15 UTC
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
Comment 11 Marcel Stimberg 2010-05-19 10:17:44 UTC
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?
Comment 12 Michael Chudobiak 2010-05-19 11:42:48 UTC
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
Comment 13 Marcel Stimberg 2010-05-19 19:57:39 UTC
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.
Comment 14 Roberto Piscitello 2010-08-07 06:40:25 UTC
I confirm that Marcel's solution fixes the bug for me (Italian locale, Ubuntu 10.04).
Thank you Marcel!
Comment 15 Paolo Bacchilega 2011-07-05 12:06:36 UTC
this should work properly in version 2.12, since it uses gvfs.