Camera Device button "Open F-spot Photo Manager" doesn't work

Bug #208467 reported by pt123 on 2008-03-28
86
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktop-file-utils
Fix Released
Undecided
Unassigned
desktop-file-utils (Ubuntu)
Low
Ubuntu Desktop Bugs
Hardy
Low
Ubuntu Desktop Bugs
gnome-volume-manager (Ubuntu)
High
Martin Pitt
Hardy
High
Unassigned
nautilus (Ubuntu)
High
Ubuntu Desktop Bugs
Hardy
High
Sebastien Bacher

Bug Description

Binary package hint: nautilus

Description: Ubuntu hardy (development branch)
Release: 8.04
Fspot : 0.4.2-1ubuntu (hardy)
GThumb: 2.10.6
------------------------------
When you attach a camera, it gets placed in the Computer area in Nautilus
eg. Canon, Inc. PowerShot A400 / PowerShot A400 (PTP mode)
Then when you open it in Nautilus, that on top of the files window appears:
This media contains digital photos and a button "Open F-spot Photo Manager"
See Attached screenshot.

When you click on this button it opens F-spot manager.
Then when you click on "import" in F-spot you get the error:
"Error Connecting to the Camera"
"Received could not lock the device while connecting to the camera"

The problem is that soon as you open camera (as mention earlier) it gets mounted and for some reason it looks other applications including fspot from gthumb from accessing it.

But if you right click on the camera in nautilus and "unmount" it fspot & gthumb can access the camera fine.

So soon as one clicks the "Open F-spot manager" it needs to unmount the camera either that or remove that button completely.

pt123 (pt123) wrote :
pt123 (pt123) wrote :

I am not sure how you have assign it to Fspot when the same problem occurs for GThumb.

Changed in f-spot:
assignee: nobody → desktop-bugs
importance: Undecided → High
milestone: none → ubuntu-8.04
status: New → Confirmed
A. Walton (awalton) wrote :

The problem is actually with GVFS mounting the camera, which blocks photo management applications from then accessing the device. This will be fixed for Hardy by simply not including the GVFS Gphoto2 backend.

Benjamin Thyreau (benji2) wrote :

Note that my #209962 bug has been marked a duplicate, while it's a different issue : the command-line to launch f-spot itself fails in the Nautilus application, while this bug relates to a failure in the import of f-spot itself.

Sebastien Bacher (seb128) wrote :

are you sure that gvfs automount the camera? that has been discussed upstream before GNOME 2.22 and alex fixed the issue

2008-03-07 Alexander Larsson <email address hidden>

 * hal/ghalmount.c:
 (get_disc_name):
 Translate disc names.

 * hal/ghalvolume.c:
 (g_hal_volume_new):
 Don't automount gphoto volumes.

Mario Limonciello (superm1) wrote :

The gvfs mounting appears to be gone now. Well this is fine, but I can't find a logical way to delete pictures on my PTP camera in fspot. The gvfs method was the only way I knew.

Sebastien Bacher (seb128) wrote :

how did you do before this cycle?

pt123 (pt123) wrote :

The problem seems to be fixed now.

GThumb picks up the camera when it is plugged into the computer
using this command in
gnome-volume-manager-gthumb %h

The camera doesn't get mounted in the Computer section. Even when "ignore" is selected when Gthumb asks if you want to import the photos.

When you open Fspot and choose import photos, it is able to access the camera.

Thanks for the fix.

  • unnamed Edit (853 bytes, text/html; charset=ISO-8859-1)

Sebastien,

I just got the camera one month ago :)

On Sun, Apr 13, 2008 at 4:11 AM, Sebastien Bacher <email address hidden> wrote:

> how did you do before this cycle?
>
> --
> Camera Device button "Open F-spot Photo Manager" doesn't work
> https://bugs.launchpad.net/bugs/208467
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Mario Limonciello
<email address hidden>

Martin Pitt (pitti) wrote :

I just discussed this with Sebastien. nautilus relies on the gvfs gphoto backend for camera detection, but that does not work properly yet and we disabled it. Thus we'll switch back to using g-v-m for photo cameras, which fits better into the current g-v-m dialog anyway. We'll disable the photo app selection widget in nautilus.

Changed in gnome-volume-manager:
assignee: nobody → pitti
importance: Undecided → High
milestone: none → ubuntu-8.04
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-volume-manager - 2.22.1-1ubuntu6

---------------
gnome-volume-manager (2.22.1-1ubuntu6) hardy; urgency=low

  * debian/patches/01_set_defaults.patch: Enable autophoto command for
    f-spot-import again, since currently we cannot use the nautilus support
    for photo cameras. This finally fixes automatic photo import again for
    Hardy. (LP: #208467)

 -- Martin Pitt <email address hidden> Tue, 15 Apr 2008 09:58:25 +0200

Changed in gnome-volume-manager:
status: In Progress → Fix Released
Steve Langasek (vorlon) wrote :

it's my understanding that only the g-v-m change is critical for 8.04; dropping the milestone on the nautilus task

Changed in nautilus:
milestone: ubuntu-8.04 → none

There's still something weird going on that is related to this.

If I insert media containing photos I expect the command specified by the gconf key /desktop/gnome/volume_manager/autophoto_command to be run.

However, this isn't happening. Instead, nautilus is trying to launch its idea of what should be handling photos and it is broken. It seems to be launching f-spot via /usr/share/applications/f-spot.desktop. I'm not sure where this association with nautilus is made - too many moving parts to understand. However, f-spot can no longer be run in import mode without specifying the --import option and f-spot.desktop is not specifying that option. I just get a dumb usage message in ~/.xsession-errors.

So, shouldn't autophoto_command be used for media containing photos? If not, the association with nautilus needs to be fixed so that f-spot-import is run rather than f-spot.

By the way, it took about 3 hours (for an experienced Linux user) to work out that autophoto_command is being ignored and the problem has something to do with nautilus. So, if the reply is "that shouldn't be happening" can you please give me a nice list of gconf keys to check to try and figure out why it is happening? ;-)

Thanks...

peace & happiness,
martin

Aaarrrggghhh! /usr/share/applications/f-spot.desktop isn't being accessed when the media is inserted. So where does the association between nautilus and f-spot come from? Explain this to me and you'll get much better bug reports on this sort of thing... :-)

Things I have checked:

* There doesn't seem to be a relevant g-conf key.
* There doesn't seem to be anything in f-spot.postinst... but then update-desktop-database could be doing anything - it is undocumented and in /usr/bin. :-(

Martin Pitt (pitti) wrote :

Martin, indeed nautilus in hardy should drop the camera program chooser, since nautilus' handling of cameras is known broken.

In hardy, it is really gnome-volume-manager which should do the camera handling. Please do

  killall gnome-volume-manager
  /usr/lib/gnome-volume-manager/gnome-volume-manager -n 2>&1 | tee /tmp/gvm.log

then plug in your camera. Press Control-C, run "/usr/lib/gnome-volume-manager/gnome-volume-manager", and attach /tmp/gvm.log here. Thank you!

Just to double-check before I do this...

In my case I'm not actually plugging in a camera. I'm inserting an SD card from a camera into a reader. I assume that this should behave similarly to a camera, but since this bug was initially concerned with actual cameras I thought I'd check before I take you too far off the track! :-)

So, do the above but insert my SD card instead of plugging in a camera?

Thanks...

Hi Martin,

Martin Schwenke [2008-05-05 12:34 -0000]:
> In my case I'm not actually plugging in a camera. I'm inserting an SD
> card from a camera into a reader.

Ah, I see. In this case this behaves similar to a normal USB hard
disk, and nautilus should call f-spot instead of a file browser. g-v-m
cannot handle this any more.

So we are back to the original bug that nautilus should unbreak camera
support handling.

This bug appears not only affect in the case you insert a SD or CF card. It also applies to all cameras which behave as storage device (not PTP). Attaching such cameras (in my case: Casio Exilim Z600) gets you into the same troubles as described above (new volume icon --> Nautilus with broken button 'Open F-spot Photo Manager'). My guess is that this bug affects quite a number of Ubuntu users.

Martin Pitt (pitti) on 2008-05-07
Changed in nautilus:
milestone: none → ubuntu-8.04.1

Yep, I agree with the last 2 comments.

So, given that changes in argument handling for f-spot has caused 2 bugs (this one and https://bugs.launchpad.net/ubuntu/+source/f-spot/+bug/202717), it would make sense to return the argument handling to the old behavour. Since f-spot is a script, it seems that the old behaviour could be emulated there:

* If the 1st arg is --import, then don't touch anything - assume sanity.

* If the 1st and only arg is a directory and it is directly under /media, then add a --import

* Otherwise, for each file:// arg, add a --view arg before it.

Also, the existing line saying:

  for arg in $* ; do

is also a bug. If someone passes a filename called "foo --trace=bar.jpg" then the wrong thing will happen - yes, that is unlikely but the fix is easy! The above should just be:

  for arg; do

A patch that does all of the above is attached. I've patched /usr/bin/f-spot rather than the source file... however, if the patch is useful then it should be easy to apply to the source file. Some of the code is bash-specific - without bash I think all is lost, since bash arrays provide a way of maintaining filenames with whitespace in them.

... and yes... the way of done it is a little bit insane, but it works for all of my desired use cases so far... :-)

By the way, the above doesn't seem to fix "f-spot --view <dir>" or "f-spot --view file://<dir>", which seems broken either way. It works in the gutsy version and the documentation seems to suggest it should work. :-(

The above patch is now even more dodgy, since https://bugs.launchpad.net/ubuntu/+source/f-spot/+bug/202717 is fixed upstream, so multiple files/uris to --view are supported again. I've attached a rediffed patch to that bug.

However, the import via nautilus problem is still there.. so this bug can focus on fixing the interaction between nautilus and f-spot... and we can forget about other f-spot problems. ;-)

I guess that nautilus just needs to be told to use "f-spot --import" when trying to import. I still don't know what tells nautilus how to call f-spot. If someone can tell me where that happens then I'll create a patch.

Steve Langasek (vorlon) on 2008-05-09
Changed in gnome-volume-manager:
importance: Undecided → High
status: New → Fix Released
Steve Langasek (vorlon) on 2008-05-09
Changed in nautilus:
milestone: none → ubuntu-8.04.1
milestone: ubuntu-8.04.1 → none
importance: Undecided → High
status: New → Confirmed

The new version of f-spot in hardy-updates (0.4.3.1-0ubuntu1) does not fix this bug - not surprising, since the bug is in nautilus... :-)

Behaviour:

* Inserting a media card from a camera still results in failure in the form of a usage message from f-spot.

* Saying

    f-spot-import <dir>

  from the command-line results in f-spot opening and displaying a pop-up saying it couldn't find a camera attached.

* Saying

    f-spot --import <dir>

  successfully imports photos.

Not sure this is useful, but I thought it couldn't hurt... :-)

I did a bit of digging, and wrote a systemtap script to work out what was happening ... and I think I know what's going on.

Nautilus is launching f-spot, this is configured in from System->Preferences->File Management, then the "Media" tab. There is a drop-down next to "Photos", which lets you choose what to do when photos are found.

On my system there are five options, ask, do nothing, open folder and "Open F-Spot Photo Manager" and "Open F-Spot Photo Manager". The trick is that you need to use the second option - it corresponds to /usr/share/applications/f-spot-import.desktop, which passes the --import option.

So problem number one is that /usr/share/applications/f-spot-import.desktop and /usr/share/applications/f-spot.desktop, both have the name "F-Spot Photo Manager" - so there's no way to determine which is which in the Nautilus configuration. That is an f-spot bug. It's fairly easy to fix just by changing the name to "F-Spot Import" or something.

The second bug is that f-spot --import with a file:// URI doesn't seem to work. I can see this from my stap script:
17432 exec f-spot /usr/lib/f-spot/f-spot.exe --import file:///media/disk

Which does open f-spot, and even opens the import window, but no directory is selected. I have to manually select my disk from the drop-down menu.

Using f-spot --import /media/disk works fine. That also seems to be a bug in f-spot.

As a workaround, changing the "%u" in f-spot-import.desktop to a "%f" fixes the import not showing anything, at least for importing from a mounted memory card - probably breaks other uses, but that'll do for me.

David Jaša (dejv) wrote :

Martin Pitt:
> Ah, I see. In this case this behaves similar to a normal USB hard
> disk, and nautilus should call f-spot instead of a file browser. g-v-m
> cannot handle this any more.
>
> So we are back to the original bug that nautilus should unbreak camera
> support handling.

What time could take fixing this bug? I'm delaying upgrade to Hardy at computers I manage because this would seriously upset my users... :(

Martin Pitt (pitti) wrote :

David Jaša [2008-05-17 19:11 -0000]:
> What time could take fixing this bug? I'm delaying upgrade to Hardy at
> computers I manage because this would seriously upset my users... :(

I hope Seb or I can get to it in the next two weeks.

Martin Pitt (pitti) wrote :

This seems to work for me and Sebastien with the new gvfs in hardy-proposed. Can everyone who is affected by this please enable proposed updates in System -> Administration -> Software Sources -> Updates, upgrade to the new GNOME releases (in particular, new gvfs and nautilus) and check whether it works now for you, too?

Changed in nautilus:
status: Confirmed → Fix Committed
Martin Pitt (pitti) wrote :

/usr/share/applications/defaults.list refers to the wrong f-spot desktop file, it needs to point to the importer.

Changed in nautilus:
assignee: nobody → seb128
status: Fix Committed → In Progress
Changed in desktop-file-utils:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Fix Committed
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Confirmed
Martin Pitt (pitti) wrote :

Updated desktop-file-utils accepted. This should fix

 - the automatic opening of f-spot when a mass-storage camera is plugged in
 - opening of F-Spot with the button in nautilus
 - the double entry of F-spot (one working, one being broken) in the nautilus media preferences.

Changed in desktop-file-utils:
status: Confirmed → Fix Committed
Martin Pitt (pitti) wrote :

Not a bug in nautilus after all.

Changed in nautilus:
status: Confirmed → Invalid
milestone: ubuntu-8.04.1 → none
status: In Progress → Invalid
Changed in desktop-file-utils:
milestone: none → ubuntu-8.04.1
Martin Pitt (pitti) wrote :

Works for me. After the update I just have one "f-spot" in the nautilus media prefs. I get the f-spot importer when plugging in a mass-storage camera, and the "open f-spot" button works correctly in nautilus, too.

Martin Pitt (pitti) wrote :

Copied to intrepid.

Changed in desktop-file-utils:
status: Fix Committed → Fix Released

I don't see the problem with importing from a media card fixed by this update.

I upgraded these packages from proposed-updates:

2008-06-01 11:23:19 status installed gvfs 0.2.4-0ubuntu1
2008-06-01 11:23:20 status installed gvfs-backends 0.2.4-0ubuntu1
2008-06-01 11:23:20 status installed nautilus 1:2.22.3-0ubuntu2
2008-06-01 11:23:20 status installed libc6 2.7-10ubuntu3
2008-06-01 11:23:29 status installed desktop-file-utils 0.15-1ubuntu4

It doesn't look like the updated .desktop file got recognised since I still see 2 items labeled other "F-Spot Photo Manager" item in the Nautilus media preferences. Do I need to restart Nautilus (or logout/login)?

If I select the other "F-Spot Photo Manager" item as Michael Ellerman suggests above, then things work as expected.

However, 1 further problem is that if I select a folder containing photos, right-click and choose "Open with F-Spot Photo Manager" then the F-Spot import dialog opens and it tries to import the photos from the media card I still have mounted! Could this be because that item runs "/usr/bin/f-spot-import" rather than "/usr/bin/f-spot --import"? I haven't tried to track it down and am out of time for now... :-(

Sebastien Bacher (seb128) wrote :

did you try using a new user? it's possible that your user configuration has extra desktop entries in its configuration.

why using the f-spot-import command would not be right?

Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in desktop-file-utils:
status: Fix Committed → Fix Released

I haven't tried with a new user yet.

Something is deciding to import the photos from the card instead of the directory I've selected in Nautilus. f-spot-import was my 1st guess since it contains some logic that tries to figure out where to import from.

Sorry I haven't had time to debug this further. Will try to make time on the weekend.

David Jaša (dejv) wrote :

Nearly fixed for me now -- nearly because there's missing option for import by gthumb in nautilus configuration although I've got gthumb installed.

Import now works fine when a media card is inserted. This is on a fresh install of Hardy.

Right-clicking on a folder in Nautilus and selecting "F-spot Photo Manager" still causes an attempt to import from a camera or media card. This seems wrong. However, it is easy to work around by selecting "Import" from the toolbar in F-spot and then finding the relevant folder.

This is starting to look good. Thanks for the great work! :-)

Martin Pitt (pitti) wrote :

Martin, thanks for testing. The "gthumb does not appear in the dropdown list" is a problem in gthumb, though. Please feel free to report a bug against it.

Hugh Winkler (hughw) wrote :

I have just experienced this problem in a dist-upgrade from Hardy to Intrepid.

The camera is iPhone gphoto2://[usb:008,002]/DCIM/100APPLE

Pressing "Open F-spot Phot manager" button in Nautilus gives error alert:

Error connecting to camera

Received error "could not lock the device" while connecting to camera.

Martin Pitt (pitti) wrote :

Hi Hugh,

Hugh Winkler [2008-10-18 18:37 -0000]:
> Pressing "Open F-spot Phot manager" button in Nautilus gives error
> alert:
>
> Error connecting to camera

This has been fixed in the latest Intrepid packages last week.

Martin Pitt (pitti) on 2009-11-18
Changed in desktop-file-utils:
status: New → Fix Released
quarky121 (dghough) on 2010-03-20
Changed in desktop-file-utils:
status: Fix Released → New
Steve Langasek (vorlon) on 2010-03-21
Changed in desktop-file-utils:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers