[gentoo-user] gtkam+non-rootuser

2006-06-23 Thread cristi
I'm trying to download my pictures from the digital camera but I can't
seem to succeed  I get Could not list folders in '/'.

An error occurred in the io-library ('Could not claim the USB device'):
Could not claim interface 0 (Operation not permitted). Make sure no
other program or kernel module (such as sdc2xx, stv680, spca50x) is
using the device and you have read/write access to the device. from
gtkam although i have ivman  hal started. I get no error when i try
to download as root though. I thought i could import direct them with
sudo gtkam but  i get (gtkam:11668): Gtk-WARNING **: cannot open
display: so in visudo i uncomment the line
Defaults:%wheel   !env_reset  and  Defaults:%users
env_keep=DISPLAY but when i get to save i get sudoers file: syntax
error, line 19 sudoers file: syntax error, line 22 any ideeas? I would
really like to get digital cameras working without logging root, also
writting a udev rule for a specific camera it's a bad ideea since all
my frinds have different models. Thanks in advance
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] gtkam+non-rootuser

2006-06-23 Thread Ralph Slooten
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

cristi wrote:
 I'm trying to download my pictures from the digital camera but I can't
 seem to succeed  I get Could not list folders in '/'.

Both my wife and I use gtkam on my PC at home, both as normal users with
no setuid programs or sudo. I am not at home at the moment but iirc what
I had to do was:

in /etc/fstab:
none  /proc/bus/usb  usbfs   user,auto,devmode=0660,devgid=85 0 0


and in user's groups add plugdev

I *think* that was all there was to it.

Greetings,
Ralph


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFEm+++Ct0ZF9kLPvYRAoDlAJ48nShEsRdbG8JgCt1kskbPkeJJsACfXIug
cvJRNJcWaNltRapgAFSfF8k=
=vkM2
-END PGP SIGNATURE-
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] gtkam+non-rootuser

2006-06-23 Thread cristi
On Fri, 23 Jun 2006 15:42:22 +0200
Ralph Slooten [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 cristi wrote:
  I'm trying to download my pictures from the digital camera but I
  can't seem to succeed  I get Could not list folders in '/'.
 
 Both my wife and I use gtkam on my PC at home, both as normal users
 with no setuid programs or sudo. I am not at home at the moment but
 iirc what I had to do was:
 
 in /etc/fstab:
 none  /proc/bus/usb  usbfs   user,auto,devmode=0660,devgid=85 0 0
 
 
 and in user's groups add plugdev

My user is plugdev group, tried also the /etc/fstab part but still no
go(when that happenedi got the hole /proc/bus/usb/ dir on my desktop)
but I had no usbfs in my /etc/fstab  all usebdevices worked fine till
now is that line mandatory somehow?

 I *think* that was all there was to it.
 
 Greetings,
 Ralph
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.0 (MingW32)
 
 iD8DBQFEm+++Ct0ZF9kLPvYRAoDlAJ48nShEsRdbG8JgCt1kskbPkeJJsACfXIug
 cvJRNJcWaNltRapgAFSfF8k=
 =vkM2
 -END PGP SIGNATURE-
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] gtkam+non-rootuser

2006-06-23 Thread Ralph Slooten
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

cristi wrote:
 My user is plugdev group, tried also the /etc/fstab part but still no
 go(when that happenedi got the hole /proc/bus/usb/ dir on my desktop)
 but I had no usbfs in my /etc/fstab  all usebdevices worked fine till
 now is that line mandatory somehow?

When you plug in your camera into your USB, what does `lsusb` show? Here:

beast ~ # lsusb
Bus 005 Device 001: ID :
Bus 004 Device 001: ID :
Bus 003 Device 010: ID 04a9:3055 Canon, Inc. PowerShot G2
Bus 003 Device 001: ID :
Bus 002 Device 003: ID 046d:c00b Logitech, Inc. MouseMan Wheel
Bus 002 Device 001: ID :
Bus 001 Device 001: ID :



Then, looking in /proc/bus/usb/[Bus-id_of_your_camera]

beast ~ # ll /proc/bus/usb/003/
total 0
- -rw-rw 1 root usb 43 Jun 23 08:39 001
- -rw-rw 1 root plugdev 57 Jun 23 18:32 010


You see, the new device created here is the root:pludged one. What does
yours show? The thing you need to keep in mind here is that you have to
have rw permissions to that new device file, else you get that error. If
yours is roor:root or something, do a chown of it and then try as
user... the chances are it'll work (until you next plug your camera is
of course).

Doing a grep for plugdev in /etc returns /etc/hotplug/usb/usbcam ...
seems that file is responsible for the permissions, but what happens
then is a mystery to me ;-)

As for that line being mandatory, no I don't believe so, but about 1
year ago I had the same issues, got talking with some usb-gurus and they
said to add that. At that time it did the trick, and since then I've
kept it ;-)

Greetings,
Ralph



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEnBnLCt0ZF9kLPvYRAlxvAJ4uPDxfpIgH8XNx7zItpTYA1mBGdACfe7WY
h35yYDMAsDN8pn8cgntDU1w=
=2Wk9
-END PGP SIGNATURE-
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] gtkam+non-rootuser

2006-06-23 Thread cristi
On Fri, 23 Jun 2006 18:41:47 +0200
Ralph Slooten [EMAIL PROTECTED] wrote:


 When you plug in your camera into your USB, what does `lsusb` show?
Bus 001 Device 001: ID :
Bus 002 Device 010: ID 03f0:6e02 Hewlett-Packard
Bus 002 Device 001: ID :
 
 Then, looking in /proc/bus/usb/[Bus-id_of_your_camera]
:) nothing there is nothing in /proc/bus/usb, found it though
in /dev/bus/usb/002/010 but 
crw-r--r-- 1 root root 189, 137 Jun 23 22:26 010 so I would still be
able to download the pictures but that does not happen

 You see, the new device created here is the root:plugged one. What
 does yours show? The thing you need to keep in mind here is that you
 have to have rw permissions to that new device file, else you get
 that error. If yours is roor:root or something, do a chown of it and
 then try as user... the chances are it'll work (until you next plug
 your camera is of course).

Searching the net also found this:
Like most, my camera identifies itself as an external hard disk
connected over the USB bus, using the SCSI transport. To access my
photos, I mount the drive and copy the image files onto my hard disk.

Not all cameras work in this way: some of them use a non-storage
protocol such as cameras supported by gphoto2. In the gphoto case, you
do not want to be writing rules for your device, as is it controlled
purely through userspace (rather than a specific kernel driver). 
here :http://www.reactivated.net/writing_udev_rules.html 
 Doing a grep for plugdev in /etc returns /etc/hotplug/usb/usbcam ...
 seems that file is responsible for the permissions, but what happens
 then is a mystery to me ;-)
 Followed the instructions there but i got lost quickly as there were
unclear to me so i did not got the script to do something useful

 As for that line being mandatory, no I don't believe so, but about 1
 year ago I had the same issues, got talking with some usb-gurus and
 they said to add that. At that time it did the trick, and since then
 I've kept it ;-)
I should also buy them a beer for a good advice here 

Thanks!
-- 
gentoo-user@gentoo.org mailing list