gthumb --import-photos doesn't work without manual unmount (unless you're English)

Bug #287689 reported by Jeff Bowden
78
This bug affects 8 people
Affects Status Importance Assigned to Milestone
gThumb
Expired
Medium
gthumb (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Jaunty by Paolo Benvenuto
Nominated for Lucid by tuharsky
Intrepid
Fix Released
Undecided
Unassigned
gtkam (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Jaunty by Paolo Benvenuto
Nominated for Lucid by tuharsky
Intrepid
Invalid
Undecided
Unassigned

Bug Description

STATUS (2010-08-07): This bug was closed with a fix which, sadly, doesn't work in many locales.
This is a regression for LTS users who upgraded from Hardy to Lucid.
A trivial fix is available in comment #26.

=================
In 8.04 I had configured gthumb --import-photos to run when I plugged in my camera. (System | Preferences | Removable Drives and Media...). But 8.10 when I plug in my camera, Nautilus mounts it via gphoto2 vfs which makes gthumb complain that it can't grab the device.

I can't find any way to tell Nautilus not to mount the camera. I tried setting the File Management Preferences for Photos to "do nothing" but it still does the something of mounting it.

The only workaround I've found is to open up nautilus, unmount the camera and then run gthumb --import-photos from the command line.

I don't know if this is a bug in hal, nautilus, or gnome-volume-manager. It's probably not a gthumb bug per se but I'm not sure where to file it really.

SRU TEST CASE:
 * Install gthumb, plug in a gphoto camera. Choose "gThumb" in the dialog about what to do with the device.
 * intrepid final: gthumb opens main window and selecting File -> Import Photos fails with a device access error.
 * with proposed fix: gthumb opens import dialog, device access works.

 * Plug in a mass storage camera. Choose "gThumb" in the dialog about what to do with the device.
 * intrepid final: gthumb opens main window
 * with proposed fix: gthumb opens import dialog

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Try this:
Go to: System -> Preferences -> Main Menu (In there navigate to Preferences and the check File Management)
then
Go to: System -> Preferences -> File Management | Media and then set Photos to gthumb.

See what happens then.

Revision history for this message
Jeff Bowden (jlb) wrote :

I don't have my camera with me so I can't test it right now but the System -> Preferences -> File Management -> Media dialog is the same as Nautilus -> Edit Preferences -> Media which I tried previously (described in my original report above).

Are you saying it makes a difference if I go to it via System -> Preferences? That seems unlikely.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Sorry I misread part of the bug report. (And had no idea you could get to that menu through nautilus)

Have you tried with nothing on in Removable Drives and Media and gthumb selected in File Management?

Revision history for this message
Stephen Irons (stephen-irons) wrote :

I have this behaviour too. In Hardy, Nautilus did not mount the PTP device so gThumb could read the camera correctly. In Intrepid, Nautilus does mount the PTP device, so both gThumb and f-spot cannot access the camera.

This is also documented in https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/208467

My work-around is:

1. in File Management Preferences (Nautilus > Edit > Preferences > Media > Photos), select gThumb photo manager

2. in Removable Drives and Media Preferences (System > Preferences > Removable Drives and Media > Cameras > Digital Camera), uncheck the Import digital photographs when connected.

Then, when you plug in a camera, gThumb pops up. On the Desktop, you can unmount the camera device. Then in gThumb, select File > Import photos, and it works properly.

I have no idea who is reponsible for mounting the PTP camera (udev? hal?, nautilus?), but there is no obvious way to change it.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Looks like the change may have been F-Spot specific in gnome-volume-manager, assigning there.

Changed in gthumb:
status: New → Invalid
status: Invalid → New
Revision history for this message
Martin Pitt (pitti) wrote :

gthumb needs to be fixed to (1) provide a proper .desktop file for nautilus' "What do you want to do with this camera" dialog, and similarly to f-spot it needs to call gvfs-mount -u on the libgphoto gvfs mount.

Changed in gnome-volume-manager:
status: New → Triaged
Changed in gthumb:
assignee: nobody → pitti
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gthumb - 3:2.10.10-0ubuntu2

---------------
gthumb (3:2.10.10-0ubuntu2) jaunty; urgency=low

  * Add 04-nautilus-import.patch: Provide a gthumb-import.desktop which works
    with nautilus and gphoto cameras. (LP: #287689)
  * 09-autoconf.patch: Refresh, previous patch touches data/Makefile.am.

 -- Martin Pitt <email address hidden> Tue, 11 Nov 2008 16:02:26 +0100

Changed in gthumb:
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Debdiff for intrepid-proposed. This is a regression compared to hardy and thus worth an SRU.

description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

intrepid SRU uploaded, waiting for Steve's review.

Changed in gthumb:
status: New → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote :

This patch also changes the MimeType field in the standard gthumb desktop file, but this isn't mentioned in the changelog; what's the reason for this change?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 287689] Re: gthumb --import-photos doesn't work in intrepid without intervention

Steve Langasek [2008-11-12 8:51 -0000]:
> This patch also changes the MimeType field in the standard gthumb
> desktop file, but this isn't mentioned in the changelog; what's the
> reason for this change?

x-content/* is used for the "what do you want to do with your camera"
import dialog when you plug one in, whereas image/* is used for "open
file with application.." in nautilus. Originally gthumb.desktop was
used for import, too, which doesn't work (calling gthumb with
gphoto:// URL). So the MIME types were split between gthumb.desktop
(for image viewing, passing the image path) and gthumb-import.desktop
for camera import, passing --import-camera).

Revision history for this message
Steve Langasek (vorlon) wrote : gthumb --import-photos doesn't work in intrepid without intervention

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gthumb:
status: In Progress → Fix Committed
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

For me, gThumb is now an option in Media Handling | Photos and comes up when camera is plugged in.
I have a Mass storage device camera, so I guess someone with a gphoto camera might still need to test.

Revision history for this message
Martin Pitt (pitti) wrote :

I have a gphoto camera, and with the actual debs from hardy-proposed (not a local build) it now works fine.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Did you mean intrepid-proposed?

Revision history for this message
Martin Pitt (pitti) wrote :

I did mean intrepid-proposed, sorry.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gthumb - 3:2.10.10-0ubuntu1.1

---------------
gthumb (3:2.10.10-0ubuntu1.1) intrepid-proposed; urgency=low

  * Add 04-nautilus-import.patch: Provide a gthumb-import.desktop which works
    with nautilus and gphoto cameras. (LP: #287689)
  * 09-autoconf.patch: Refresh, previous patch touches data/Makefile.am.

 -- Martin Pitt <email address hidden> Tue, 11 Nov 2008 16:02:26 +0100

Changed in gthumb:
status: Fix Committed → Fix Released
Changed in gthumb:
status: Unknown → Fix Released
Revision history for this message
Jeff Bowden (jlb) wrote :

Thanks. It's so great to have this working again. In the pref dialog I had to guess which "gThumb Image Viewer" corresponded to the new gthumb-import.desktop but once I got it I was a happy camper. Perhaps the Name= should be changed to "gThumb Import" ?

Revision history for this message
antistress (antistress) wrote :

i'd like to report the same bug concerning GTKam 0.1.16.1 and Jaunty

i'm using jBrout to handle my photo but it lacks the gphoto stuff therefore i'd like to use GTKam to import my photos since i don't need gThumb nor F-Spot.

Could you please fix GTKam in the same way ?

Changed in gthumb:
status: Fix Released → New
Revision history for this message
Paolo Benvenuto (donpaolo) wrote :

Bug still present in jaunty beta.

I use gthumb for photo importing.

when I connect the camera and switch it on, the mount disks applet shows 2 cameras (they refer to the same usb device, my camera), which is a bug, The camera results mounted, so that gthumb --import-photos says "An error occurred in the io-library ('Could not lock the device'): Camera is already in use."

$ gthumb --version
GNOME gthumb 2.10.11

Revision history for this message
Paolo Benvenuto (donpaolo) wrote :

I think this is a duplicate of https://bugs.launchpad.net/bugs/351122

Changed in gthumb:
status: New → Fix Released
Revision history for this message
tuharsky (tuharsky) wrote :

I can confirm Paolo. Bug still present in 9.10 Karmic i386. After plugging in the camera, it is automounted twice, then gThumb is opened and complains. The gThumb version is 2.10.11

Revision history for this message
frankie (frankie-etsetb) wrote :

I also had problems in karmik, the device is gPhoto instead gphoto ( notice the capital L). It also takes a couple of seconds
to umount so I added it to the exec.

I fixed my gthumb-import.desktop in karmik like this:

/usr/share/applications/gthumb-import.desktop

Exec=sh -c 'gvfs-mount -u ~/.gvfs/g*hoto2*; sleep 3 ; exec gthumb --import-photos'

Revision history for this message
Jeremy Austin-Bardo (ausimage) wrote :

I thought I would add my 2 cents to this frustrating mess called gphoto2. Like many others I have suffered through many releases with broken digital camera import support. In Lucid. I cannot even gphoto2 -l or gphoto2 -P my photos! Which I used to do most of the time under Karmic. I have gone through the suggestion in the bug reports to see if anything would work and nothing has thus far to rid the "Locked Device" on Lucid.

I have a Kodak DX7590... both gphoto2 --auto-detect, lsusb, and gnome-devices recognize the device. I notice though that there is no folder within /.gvfs to indicate the camera was mounted... this is proven by the fact that gvfs-mount - u complain "Error finding enclosing mount: Containing mount does not exist"

I am at a loss as to how Canonical or Upstreams would let this drag out over so many releases.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Intrepid Ibex reached end-of-life on 30 April 2010 so I am closing the
report. Can anyone confirm whether this issue still exists in later versions of Ubuntu?

Changed in gtkam (Ubuntu Intrepid):
status: New → Invalid
Changed in gtkam (Ubuntu):
status: New → Invalid
Changed in gthumb:
status: Fix Released → Confirmed
Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

I'm reopening this bug because the problem persists for several locale settings. As I said in the upstream bug report, matching the localized mount point name is really ugly, and even using something like "*g[Pp]hoto2*" might work for most locales it still fails for some (in the worst case, gphoto2 is translated as ГФото2 …). There's a better alternative, use the "unmount-scheme" option.

If you are affected by the bug in your locale, please try replacing the line starting with "Exec=…" in the /usr/share/applications/gthumb-import.desktop file by

Exec=sh -c 'gvfs-mount -s gphoto2; exec gthumb --import-photos'

This should work independent of the locale.

Changed in gthumb (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Fred (frederic-lespez) wrote :

Marcel,

Your workaround works fine here with fr_FR.utf8 locale.
Thanks.

Revision history for this message
robepisc (robepisc) wrote :

Works with it_IT.utf8 too.

description: updated
summary: - gthumb --import-photos doesn't work in intrepid without intervention
+ gthumb --import-photos doesn't work without manual unmount (unless
+ you're English)
Changed in gthumb:
importance: Unknown → Medium
Revision history for this message
Antoine Mairesse (antoine-mairesse) wrote :

gthumb-import was working fine on 8.4 here and is failing since the upgrade to 10.4

The fix given on comment #26 is ok for me on 10.4

Martin Pitt (pitti)
Changed in gthumb (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
Changed in gthumb:
status: Confirmed → Expired
Revision history for this message
Jackson Doak (noskcaj) wrote :

this was fixed a long time ago

Changed in gthumb (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.