Bug 130755 - gtkam requires root privileges
Summary: gtkam requires root privileges
Alias: None
Product: Fedora
Classification: Fedora
Component: gphoto2
Version: 3
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
Depends On:
Blocks: FC3Target
TreeView+ depends on / blocked
Reported: 2004-08-24 13:01 UTC by kaye gee
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version: 2.1.4-6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-08-31 16:56:39 UTC

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

Description kaye gee 2004-08-24 13:01:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)

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:

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 13:28:32 UTC
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 13:47:13 UTC
Created attachment 103025 [details]
Output from strace to detect  device

Comment 3 Tim Waugh 2004-08-24 13:57:57 UTC
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 14:08:00 UTC
No the steps above produce the same error message.
  "could not initialize camera"

Comment 5 Tim Waugh 2004-08-24 14:44:39 UTC
What does 'rpm -V gphoto2' say?

Comment 6 kaye gee 2004-08-24 14:50:54 UTC
rpm -V gphoto2 retuns no value

Comment 7 Tim Waugh 2004-08-24 15:00:20 UTC
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 15:10:42 UTC
Created attachment 103027 [details]
hotplug syslog entries

Comment 9 Tim Waugh 2004-08-24 15:20:21 UTC
This seems to be a hal problem then.  The /etc/hotplug/usb/usbcam
script is being ignored.

Comment 10 David Zeuthen 2004-08-24 19:14:18 UTC
This seems to me to be a hotplug problem.

Comment 11 David Zeuthen 2004-08-26 10:12:20 UTC
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 10:17:50 UTC
..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 10:20:27 UTC
Ah, my bad,

[david@laptop gnome-volume-manager]$ rpm -qf /etc/hotplug/usb/usbcam
[david@laptop gnome-volume-manager]$ rpm -qf

so both gphoto2 and sane-backends needs a bit of the patch each.

Comment 14 Tim Waugh 2004-08-26 10:25:58 UTC
Fixed packages are:


Comment 15 David Zeuthen 2004-08-31 16:30:21 UTC
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 ]
         CONSOLEOWNER=`cat /var/run/console/console.lock`
-    elif [ -f /var/lock/console.lock ]
     elif [ -f /var/run/console.lock ]
         CONSOLEOWNER=`cat /var/run/console.lock`

Comment 16 Tim Waugh 2004-08-31 16:56:39 UTC
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.