SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to set up the program gphoto2 to download photos
from my USB-cam (a canon PowerShot A450).
It works when i run gphoto2 as root, but not for a normal user.
Clearly a problem of permissions. But how to set the permissions
of a dynamically mounted USB device?
The manual that comes with gphoto instructs to place the files
/etc/hotplug/usb.usermap
and the script
/etc/hotplug/usb/usbcam
It did not work. Nothing happened.
Maybe the question is: Where should i place these files so that
the script is run when a new USBCAM is detected?
PS. My O.S. is Slackware 12.
It depends. Do you have HAL installed and running ? By default it is. If so, I would add yourself to the appropriate groups as stated in the HAL sticky. The other way is to change/add udev rule for it to have a certain permission when the node is created.
I installed the package from http://www.slackware.com/~alien/slac...ikam/pkg/12.0/
but gphoto2 still works only as root.
It added a file
/etc/udev/rules.d/90-libgphoto2.rules
that should have assigned permission 660 belonging to group plugdev
I am in this group. The entries in
/proc/bus/usb
that were mounted when the camera was plugged still belong to root:root
But alas, manually changing their permission to 666 still does not work.
For now think i will give up gphoto2 and try digiKam.
Just to add my confusion to this subject. I have 2 laptops and one desktop, all running Slackware 12.0, all up-to-date with the same installations apart from having different kernels. I've first installed Slackware 12 on one of the laptops and kept the default kernel Slack offered me (along with my own modifications). I did not need to do a thing to get my camera working apart from copying udev rules I've kept from previous system. Nothings else and I could access my Cannon Ixus 40 PTP camera via Digikam as ordinary user. The horror unleashed when I've tried to do the same with the other computers, both featuring newer kernels (2.6.22 and 2.6.23). Suddenly I couldn't access the camera other than root. Nothing helped. I've read all the threads I found here and in other places. I've followed all the instructions, build all packages my self, added 90-local.rules etc. No results.
Finally, I've started to look for differences in my kernel configs and googled something about a deprecated option CONFIG_USB_DEVICE_CLASS. Manually setting this option to 'y' solved my nightmares. Now, I don't have any energy left to search what is it, why do I need it or what it does imply. I just thought it may help someone else stuck with similar issue.
Apart from that, thanx for all the great instructions in this and other threads here.
I just bought a new digital camera (Fuji A900). It is detected fine when running gphoto2 as root, and I can get pictures off of it fine, but it will not work as a regular user. I've tried adding a udev rule for it, but it still will not be detected when running gphoto2 as regular user.
The device is:
Code:
Bus 1 Device 8: ID 04cb:01c7 Fuji Photo Film Co., Ltd
The rules I added to '/etc/udev/rules.d/90-usbcam.rules' are:
I restarted udev, plugged in the camera and it is NOT detected as user. I am a member of 'plugdev' and other devices such as cdrom and usb sticks can be accessed just fine. I also restarted HAL and tried reloading the messagebus, but this also had no effect. This is strange. Any ideas ?
Very strange indeed. I don't know why it works. I don't knhow why it doesn't work.
I just tried to do the same recipe on another computer, also with Slackware 12 and there was no way to change the permission mode and ownership of the usbdev.
It just seems to ignore the /etc/udev/rules.d/90-usbcam.rules.
Could it be that another rule has already matched? I think that udev reads the files in order, and uses the first match it finds. 90 is pretty low precedence, try moving it up to see if it makes a difference.I think that local rules are usually moved way up. Try 10-local.rules.
I have the same problem; I compiled libgphoto2 both with AlienBOB's slackbuld and the one from Slackbuilds.org (without checking whether they're the same script ), with both I had problems. Reading this thread, I did:
Code:
$ zgrep CONFIG_USB_DEVICE_CLASS /proc/config.gz
# CONFIG_USB_DEVICE_CLASS is not set
I'll recompile the kernel (2.6.24 in my case) and see if it works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.