Alberto Hernando wrote:
Hi.

I have installed a lfs-6.2. Then, following the blfs book (svn version) I've installed d-bus, hal, linux-pam and lots of other things. No problem so far, but now I'm trying to access my camera and pendrive from kde. When I plug one device, it is detected and a window appears, so hal and d-bus are working nicely. But when I select "open" (or whatever) I get a message complaining that there is security policy preventing me from accessing the device. Linux-pam, of course. I've read the documentation in the book and the PAM administration guide and I haven't been able to make it work. For example, according to the book, my user must belong to the halusers group. But this group doesn't exist, so there are no files in the system that know about it. I've added a file "hal" to /etc/pam.d with a minimum configuration that works, according the PAM docs, but it has no effect. Can anybody help me?

Thanks

Hi Alberto:

First, credit goes to Gregory Gulik and his page here:
http://www.gagme.com/greg/linux/usbcamera.php

My camera works fine with kde 3.5.4 (sony dsc w5 ).
My base system is straight from the lfs-stable book.
My application system is a mix from blfs-development and my own additions.

I assume that you have your kernel compiled correctly for your devices. For my camera i needed:
1. * USB Mass Storage
2. M SCSI Disk Emulation

You also need the file system of your devices compiled into the kernel or as modules. My camera the file system is:
1. M vfat

I also assume that udev is working correctly. Your usb storage devices should be owned by root:disk. Thus, your user should be in the disk group.

If everything is configured correctly up to this point, you should see your device when you type "lsusb" in your shell.

To test the availability of my camera before attempting to use it with kde, i made an entry in fstab:
/dev/sda1 /mnt auto rw,noauto,users 0 0

/dev/sda1 is where you will find your device if it is the only usb storage device you have. You may need to dig a little deeper if you have more than one device and you are trying to find your camera, etc.

If you can successfully mount your devices as root/users, then you are more than half way there. By the way, this is how I learned the file system required for my camera as mount came back with an error stating that "vfat is an unknown file system". A simple recompile of the kernel fixed that.

After these preliminary tests were completed, I removed the fstab entry for my camera.

I apologize now, if you are already aware of the above :)

Testing hal is fairly easy and there is a plethora of information messages generated to sys.log if you add these two options to the haldaemon start script:

--verbose=yes --use-syslog

The haldaemon group is used for hald. In my system, there are no other users in the haldaemon group except for the haldaemon user. I never did anything to any PAM module to get this to work.

When you plug in your device, you should see messages that pertain to your device.

The standard hal config worked for me except for one addition i had to make. Goto...
/usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi

The top <device> description is for your computer. Notice the "keys" that specify "mount_option". These options are the same as you will find in "man mount". They are the same as you would use in your fstab. I had to add the following new "key" to the computer <device> section.

<merge key="storage.policy.default.mount_option.user" type="bool">true</merge>

I made the change right there, but it would be better to copy this file to /etc/hal/fdi/policy and make the change there.

Then restart hal and kde.

Good Luck,
Shawn
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to