Bug 130755 - gtkam requires root privileges
gtkam requires root privileges
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gphoto2 (Show other bugs)
3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks: FC3Target
  Show dependency treegraph
 
Reported: 2004-08-24 09:01 EDT by kaye gee
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.1.4-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-31 12:56:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Output from strace to detect device (26.64 KB, text/plain)
2004-08-24 09:47 EDT, kaye gee
no flags Details
hotplug syslog entries (355 bytes, text/plain)
2004-08-24 11:10 EDT, kaye gee
no flags Details
patch for hotplug to give console permissions on hotplug (1.29 KB, patch)
2004-08-26 06:12 EDT, David Zeuthen
no flags Details | Diff

  None (edit)
Description kaye gee 2004-08-24 09:01:31 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Gecko/20040809

Description of problem:
Gtkam reports an error when trying to add cameras.

Error message is "could not initialize camera"


Version-Release number of selected component (if applicable):
gtkam-0.1.12-2  using kernel-2.6.8-1.526

How reproducible:
Always

Steps to Reproduce:
1. As a non-root user launch Digital Camera Tool:
2. On the menu bar click "Camera" and then "Add Camera"
3. Click "Detect" (Camera is detected)
4. Click "Apply" or "OK"
    

Actual Results:  gtkam returns error message

"Could not initialize camera"

Expected Results:  Camera should have been to gtkam

Additional info:

Camera type:  Canon 10D (using both PTP and Normal communication mode)
              Sony DSC-S75

NOTE:  Both cameras are detected and accessible when gtkam is launched
as root.
Comment 1 Tim Waugh 2004-08-24 09:28:32 EDT
This is not a gtkam problem but one of device permissions.  Which
device node does gtkam use for that camera?  If you aren't sure, you
can use 'strace -eopen gtkam 2>log' as root to find out.
Comment 2 kaye gee 2004-08-24 09:47:13 EDT
Created attachment 103025 [details]
Output from strace to detect  device
Comment 3 Tim Waugh 2004-08-24 09:57:57 EDT
Okay, it's a USB device.  Please try this:

Unplug your camera
Log on as your own (non-root) user
Insert your camera
Try gtkam

Does that work properly?
Comment 4 kaye gee 2004-08-24 10:08:00 EDT
No the steps above produce the same error message.
  "could not initialize camera"
Comment 5 Tim Waugh 2004-08-24 10:44:39 EDT
What does 'rpm -V gphoto2' say?
Comment 6 kaye gee 2004-08-24 10:50:54 EDT
rpm -V gphoto2 retuns no value
Comment 7 Tim Waugh 2004-08-24 11:00:20 EDT
Are there any 'hotplug' messages added to /var/log/messages when you
unplug and re-insert the camera?
Comment 8 kaye gee 2004-08-24 11:10:42 EDT
Created attachment 103027 [details]
hotplug syslog entries
Comment 9 Tim Waugh 2004-08-24 11:20:21 EDT
This seems to be a hal problem then.  The /etc/hotplug/usb/usbcam
script is being ignored.
Comment 10 David Zeuthen 2004-08-24 15:14:18 EDT
This seems to me to be a hotplug problem.
Comment 11 David Zeuthen 2004-08-26 06:12:20 EDT
Created attachment 103114 [details]
patch for hotplug to give console permissions on hotplug

This patch should fix the problems.
Comment 12 Tim Waugh 2004-08-26 06:17:50 EDT
..and this file is provided by gphoto2, so it was a gphoto2 bug after
all.  Thanks, forgot about the path change. :-(
Comment 13 David Zeuthen 2004-08-26 06:20:27 EDT
Ah, my bad,

[david@laptop gnome-volume-manager]$ rpm -qf /etc/hotplug/usb/usbcam
gphoto2-2.1.4-2.1
[david@laptop gnome-volume-manager]$ rpm -qf
/etc/hotplug/usb/libusbscanner
sane-backends-1.0.14-3

so both gphoto2 and sane-backends needs a bit of the patch each.
Comment 14 Tim Waugh 2004-08-26 06:25:58 EDT
Fixed packages are:

gphoto2-2.1.4-5
sane-backends-1.0.14-4
Comment 15 David Zeuthen 2004-08-31 12:30:21 EDT
Almost there, needs this patch against gphoto2

--- usbcam.orig 2004-08-31 18:31:54.763716496 +0200
+++ usbcam      2004-08-31 18:20:03.212888664 +0200
@@ -29,7 +29,6 @@
     if [ -f /var/run/console/console.lock ]
     then
         CONSOLEOWNER=`cat /var/run/console/console.lock`
-    elif [ -f /var/lock/console.lock ]
     elif [ -f /var/run/console.lock ]
     then
         CONSOLEOWNER=`cat /var/run/console.lock`
Comment 16 Tim Waugh 2004-08-31 12:56:39 EDT
Oops.. fixed in 2.1.4-6.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.