Summary: | Opening default app when camera inserted return KIOExec error | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Carl <sleepkreep> |
Component: | Import-Gphoto2 | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | abrams, caulier.gilles, ismail |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: | |||
Attachments: | Patch fixing the issue. |
Description
Carl
2005-11-29 01:04:01 UTC
Check your ~/.xsession-errors file kio (KDirWatch): KDirWatch-1 emitting dirty /proc/net/arp kio (KTrader): KServiceTypeProfile::offers serviceType=media/gphoto2camera genericServiceType=Application kio (KTrader): KServiceTypeProfile::offers serviceType=media/gphoto2camera genericServiceType=KParts/ReadOnlyPart kio (KTrader): query for media/gphoto2camera : returning 1 offers kio (KDirWatch): KDirWatch-1 emitting dirty /proc/net/arp kio (KIOJob): stat media:/camera kio (UIServer): UIServer::newJob observerAppId=kdesktop. Giving id=20 kio (UIServer): UIServer::stating 20 media:/camera kdeinit: Got EXEC_NEW 'kio_media' from launcher. kio (KLauncher): kio_media (pid 22274) up and running. DCOP: register 'kio_media-22274' -> number of clients is now 30 DCOP: unregister 'kio_media-22274' DCOP: register 'anonymous-22274' -> number of clients is now 30 kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-carl/ksycoca media kioslave: MediaProtocol::stat: media:/camera media kioslave: MediaImpl::statMedium: camera media kioslave: MediaList::findByName(camera) media kioslave: MediaProtocol::createMedium media kioslave: url = media:/camera, mime = media/gphoto2camera kio (KIOJob): stat camera:/ kdeinit: Got EXEC_NEW 'kio_kamera' from launcher. kio (KLauncher): kio_kamera (pid 22275) up and running. kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-carl/ksycoca kio (UIServer): UIServer::jobFinished id=20 kio (KLauncher): KLauncher: Got start_service_by_desktop_path('.hidden/digikam-2.desktop', ...) kdeinit: Got EXT_EXEC 'kioexec' from launcher. Could not load library! Trying exec.... kio (KLauncher): kioexec (pid 22278) up and running. kio (KDirWatch): KDirWatch-1 emitting dirty /proc/net/arp DCOP: register 'kioexec-22278' -> number of clients is now 31 kioexec: command=digikam --detect-camera kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-carl/ksycoca kioexec: Copying media:/camera to file:///var/tmp/kdecache-carl/krun/22278.0.camera kio (KIOJob): kio_uiserver registered kio (UIServer): UIServer::newJob observerAppId=kioexec-22278. Giving id=21 kioexec: Constructor returned... kio_file: put(): /var/tmp/kdecache-carl/krun/22278.0.camera, mode=-1 kio (kioslave): SlaveBase::canResume offset=0 kdeinit: Got EXEC_NEW 'kio_media' from launcher. kio (KLauncher): kio_media (pid 22285) up and running. DCOP: register 'kio_media-22285' -> number of clients is now 32 DCOP: unregister 'kio_media-22285' DCOP: register 'anonymous-22285' -> number of clients is now 32 kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-carl/ksycoca kio_media: ForwardingSlaveBase::get: media:/camera media kioslave: MediaList::findByName(camera) kdeinit: Got EXEC_NEW 'kio_kamera' from launcher. kio (KLauncher): kio_kamera (pid 22286) up and running. kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-carl/ksycoca kio (KIOJob): error 11 / kio (KIOJob): error 11 / kio (Scheduler): Scheduler: killing slave 19792 kio (Slave): killing slave pid=19792 (file://) kio (KIOConnection): ERROR: Header read failed, errno=104 kio (KIOJob): Job::kill this=0x819e2d0 KIO::TransferJob m_progressId=0 quietly=true kio (KIOConnection): ERROR: Header has invalid size (-1) kio (kioslave): SlaveBase::waitForAnswer has read error. kio (UIServer): UIServer::jobFinished id=21 kdeinit: PID 19792 terminated. This is a permission problem. try running digiKam as root to see if that works... btw, where do you see that error and do you have a mass storage camera? i get the same error (and i run as root) also... if i Cancel the "storage media" dialog and issue "digikam --detect-camera" command at the konsole, Digikam opens with camera dialog and all works just fine. To answer your question Tom, I have a 1GB card in my camera. I'm not sure if that qualifies as a mass storage camera. I got that error from my .xsession-errors file. I get the same error. Problem is ( i guess) that kio_media expects a command containing an placeholder for an URL, like %u, but the digikam-command 'digikam --detect-camera' does not need/accept one. I noticed the same problem with dvd's and mplayer. mplayer likes to access dvd's with the command 'mplayer dvd:/', but that one can't be used because kio_media puts another url right behind it, thus confusing mplayer. Kaffeine works around this by accepting a URL in its command: kaffeine -d %u DVD digikam --download-from %u also works, but only with usb mass storage devices, not with camera's that need gphoto. Same problem here using a Canon Powershot A70 on kde 3.5.3 while trying to start digikam. When I plugin the camera a window shows up "A new medium has been detected. What do you want to do?". Because starting digikam was not listed there I added it to the actions. But when I choose this action, a message box pops up containing "Error - KIOExec. The file or folder / does not exist." and digikam isn't started at all. The Powershot A70 is no mass storage camera but needs the PTP. The comment from Rinse sounds very plausible to me. Current 0.9.0-svn (trunk) implementation have been fixed by Marcel this week. Please checkout the code and try again. Note : stable branch (0.8.2) is not patched. Gilles Caulier I had the same problem with gentoo, kde 3.5.2, and digikam, and Canon PowerShot G6 which works in PTP mode. I fixed this by simple way, I changed the command line to ``digikam --detect-camera -caption "%u"`` and eveything works fine. Andrzej Sobczyk andrzej(at)sobczyk(dot)eu Hey, that worked. Thanks! Yeah - I was about to suggest something similar to what Andrzej Sobczyk (but got interrupted and just came back now) In other cases "|" (pipe) can be a good command to have ... (e.g. playing cd audio with xmms - which was my problem) xmms -p | grep -i %u Current SVN installs a helper script which happily accepts an %u parameter ("/usr/kde/3.5/share/apps/digikam/utils/digikam-camera storage %u" is the command line in the digikam-mount-and-download.desktop file). I don't know where you specify a default app that the media manager should start, but there is a "Digikam mount and download" entry in the media dialog, which represents one of the .desktop files mentioned above. If the desktop files are not installed (0.9 series only I think) it's probably a KDE or distribution issue. digikam --detect-camera -caption "%u" worked for me ! thanks :-) I am reopening the bug, problem occurs because digikam-gphoto2-camera.desktop has no %u in Exec line hence KDE tries to download with kioexec, solution is to add %u there and ignore extra argument for detect case in digikam-camera. I will attach a patch to fix the issue. Created attachment 18894 [details]
Patch fixing the issue.
Confirming with 0.9.0 rc2. SVN commit 613015 by cgilles: digikam from trunk : patch from ismail donmez (cartman) to fix hotplug digiKam script : digikam-gphoto2-camera.desktop has no %u in Exec line hence KDE tries to download with kioexec, solution is to add %u there and ignore extra argument for detect case in digikam-camera. BUG: 117248 CCMAIL: ismail@kde.org M +12 -3 digikam-camera M +1 -1 digikam-gphoto2-camera.desktop.in --- trunk/extragear/graphics/digikam/utilities/hotplug/digikam-camera #613014:613015 @@ -10,6 +10,7 @@ storage) cmdoption=--download-from dcopcall=downloadFrom + args="$@" ;; *) echo "${0##*/}: wrong action. Usage" @@ -23,9 +24,17 @@ case "$app" in digikam-*) echo "recycling running $app: $dcopcall $@" - exec dcop "$app" camera "$dcopcall" "$@" + if test -z "$args"; then + exec dcop "$app" camera "$dcopcall" + else + exec dcop "$app" camera "$dcopcall" "$args" + fi ;; esac done; -echo "starting digikam with $cmdoption $@" -exec digikam "$cmdoption" "$@" +echo "starting digikam with $cmdoption $args" +if test -z "$args"; then + exec digikam "$cmdoption" +else + exec digikam "$cmdoption" "$args" +fi --- trunk/extragear/graphics/digikam/utilities/hotplug/digikam-gphoto2-camera.desktop.in #613014:613015 @@ -1,5 +1,5 @@ [Desktop Action digiKam Detect and Download] -Exec=@digikamhelper_dir@/digikam-camera detect +Exec=@digikamhelper_dir@/digikam-camera detect %u Icon=digikam Name=digiKam Detect and Download *** Bug 141288 has been marked as a duplicate of this bug. *** |