LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-14-2007, 12:55 AM   #1
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Slack12, libgphoto2-2.4.0, Canon Powershot A95


Hi All,

I recently built Digikam 0.9.2, gphoto2-2.4.0, and libgphoto2-2.4.0 using slackbuilds from slackbuilds.org. Everthing works fine, but I can only access the camera as root. I have all users in the plugdev group but still no joy.

This is a bit frustrating as I had this working over several earlier versions of slack and libgphoto2 and had copied a functional camera.rules which I had been using for new installs. Apparently the syntax has changed and no matter what I seem to try, a normal user cannot access the camera.

Thanks in advance.
 
Old 10-14-2007, 07:30 AM   #2
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
when you connect the camera... does HAL allow you to auto mount it as a normal user >?
 
Old 10-14-2007, 07:57 AM   #3
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Original Poster
Rep: Reputation: 217Reputation: 217Reputation: 217
Thanks for the reply.

I use KDE, so when the camera is connected as a normal user I get a pop-up that tells me a camera was detected and asks what I want to do with it. When I open Digikam (not given as a choice by the media pop-up by-the-way), the the camera can be added to the camera list in Digikam using the auto-scan procedure, and is detected as the A95 in PTP mode (previous versions of libgphoto2 also saw normal mode, but not 2.4.0) When I try to access the camera however, it fails. I would like to add, that any time I have had a permissions problem with a camera in the past, I was NOT able to add the camera to the camera list in digikam, even if auto-scan detected it.

As root, the camera is detected by KDE as well, but when the Media pop-up tells me a camera has been detected, opening the camera with Digikam is listed as an option, whereas a normal user is not given this as a choice.

Just a reminder that this camera cannot be loaded as a usb mass storage device. You must use libgphoto2.
 
Old 10-14-2007, 08:38 AM   #4
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Ohh, I am sorry , I thought it was mounted as a USB Mass storage device (most cameras are).

Quote:
As root, the camera is detected by KDE as well, but when the Media pop-up tells me a camera has been detected, opening the camera with Digikam is listed as an option, whereas a normal user is not given this as a choice.
I think this implies the problem is in digikam. I think your normal user's KDE isn't properly configured to use digikam (rather it doesn't know that digikam is there). You might wanna play around in the KDE control centre , you could probably fix it somewhere there.


But as I said, I never used libgphoto so wouldn't know much.
 
Old 10-14-2007, 09:24 AM   #5
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Original Poster
Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by duryodhan View Post
Ohh, I am sorry , I thought it was mounted as a USB Mass storage device (most cameras are).



I think this implies the problem is in digikam. I think your normal user's KDE isn't properly configured to use digikam (rather it doesn't know that digikam is there). You might wanna play around in the KDE control centre , you could probably fix it somewhere there.


But as I said, I never used libgphoto so wouldn't know much.
No, digikam works fine. This is a usb permissions problem involving udev rules and libgphoto2 (maybe hal too). Just in case, I also tried gtkam and this application also failed to initialize the camera as a normal user despite correctly identifying the camera via auto-scan.

I'm currently re-reading the ghoto2 documents regarding usb permissions. The author indicates that a hal-fdi file needs to be edited or created. Maybe this is involved as hal also appears to be a new wrinkle here. I'm not really confident though as the examples are from FC6 and the author states from the top he's clueless regarding hal so he just copied and pasted the examples to his howto.

I'm also wondering if I need to something different because this is now a PTP camera with no option for normal mode any longer.

Sigh - too many variables.

Anyone successfully beat this combo into submission?

Slackware-12.0, udev-111, hal-0.9.5.1, libghoto-2.4.0, and gphoto-2.4.0?

Last edited by Franklin; 10-14-2007 at 09:25 AM.
 
Old 10-14-2007, 09:44 AM   #6
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
I have here Slackware 12.0 running, gphoto2-2.4.0, libgphoto2-2.4.0, gtkam-0.1.14 and libexif-gtk-0.3.5 (hal and udev in your mentioned versions). I used the Slackbuilds from slackbuilds.org.

I have a Canon PowerShot A 60.

I added a rule to $HOME/.ivman/IvmanConfigActions.xml to open gtkam at the moment the camera is plugged in (I use fluxbox as windowmanager).

This works without any problems. I can copy, remove, add folders, pictures, movies from and onto the camera.

My user is in group "plugdev,audio,cdrom,video,wheel".

Fluxx.

Last edited by Fluxx; 10-14-2007 at 09:47 AM.
 
Old 10-14-2007, 10:29 AM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Hm, I have a "Start digiKam" in the KDE popup window that appears when I plug in a camera. I am using my own set of packages for digiKam: http://www.slackware.com/~alien/slackbuilds/digikam/ (it's dependencies can be found there as well).

Eric
 
Old 10-14-2007, 12:10 PM   #8
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Original Poster
Rep: Reputation: 217Reputation: 217Reputation: 217
I don't believe this is a digiKam issue per se.

After reading the usb permissions howto from gphoto2 and looking at the referenced files on my install, I am beginning to suspect that the slackbuild script I used may not have worked as advertised.

I think I will look for another libgphoto2 build script to try and see if that helps at all.

My group ownership does not seem to be an issue and I'll spare you all the output of ldd on both digiKam and gtkam. All dependencies are met.

Steve
 
Old 10-14-2007, 12:59 PM   #9
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Original Poster
Rep: Reputation: 217Reputation: 217Reputation: 217
Well, I went the easy route and installed Alien Bob's packages for digiKam and libgphoto2 and unfortunately I am still unable to access the camera as a normal user. Root works great as allways.

So it seems I'm just not configuring udev properly.

I guess I'll keep googling for an answer.

Thanks.
 
Old 10-14-2007, 09:54 PM   #10
fcaraballo
Member
 
Registered: Feb 2004
Location: WA
Distribution: Slackware
Posts: 230

Rep: Reputation: 31
Could you post your rules file? it might help us figure out your problem. Also, the libgphoto2 script from SBo was modified from the original to create a rules file for you (iirc), so that might have been your problem when using that script.

FYI, gphoto2 has not been a dependency of digiKam for quite some time. There is no reason to install it unless you plan on accessing your camera from the CLI.

MagicMan
 
Old 10-15-2007, 02:21 AM   #11
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
This appears to be the udev rules problem which I have had

I found that adding the line

SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="3058", GROUP="users"
to 10-udev.rules got it working for users as well as root.

Looking back over my old postings here what I did to get the SYSFS values was /usr/lib/libgphoto2/print-camera-list udev-rules > camera.rules
By examining the usbcam.usermap file I was able to identify the camera in camera.rules.
 
Old 10-15-2007, 08:33 AM   #12
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
The udev rules generated by libgphoto2 *should* work properly. If they don't, then my first guess is that it's a problem with the rule generator itself.

Alternatively, if you're using a newer kernel than what Slackware 12 ships, then it's a good possibility that changes to the kernel's sysfs structure might have some effect, but I'm honestly not sure. I do know that my wife's camera (in PTP mode) worked just fine in a stock Slackware 12 installation with the libgphoto2 from SlackBuilds.org when I approved the script.
 
Old 10-15-2007, 10:58 AM   #13
redbuds
LQ Newbie
 
Registered: Apr 2003
Location: SE oklahoma
Distribution: slackware
Posts: 16

Rep: Reputation: 0
Just a comment about the digikam slackbuild at slackbuild.org and all the dependencies. I used them and my camera woks as normal user.
 
Old 10-15-2007, 12:41 PM   #14
fcaraballo
Member
 
Registered: Feb 2004
Location: WA
Distribution: Slackware
Posts: 230

Rep: Reputation: 31
Quote:
Originally Posted by rworkman View Post
The udev rules generated by libgphoto2 *should* work properly.
I got the impression that he was still using his old camera.rules file when he tried the new libgphoto2 from SBo and that might have been the source of the problem, conflicting rules files. He removed it though and installed using Eric's script and it still doesn't work. Its likely that the rules file he's currently using still needs minor tweaking but we wont know that until we see it.

Quote:
Originally Posted by redbuds
I used them and my camera woks as normal user.
Always glad to hear that kind of feedback

MagicMan
 
Old 10-15-2007, 06:43 PM   #15
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Original Poster
Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by rworkman View Post
The udev rules generated by libgphoto2 *should* work properly. If they don't, then my first guess is that it's a problem with the rule generator itself.

Alternatively, if you're using a newer kernel than what Slackware 12 ships, then it's a good possibility that changes to the kernel's sysfs structure might have some effect, but I'm honestly not sure. I do know that my wife's camera (in PTP mode) worked just fine in a stock Slackware 12 installation with the libgphoto2 from SlackBuilds.org when I approved the script.
Hi Everyone and thanks for the replies. I had this thing called work today, but I wanted to reply and let you know I was still listening.

I am running a different (from slackware stock) kernel on both my computers - 2.6.22.5. Each computer has a different config tuned to the hardware. This may indeed be involved. One variable at a time please.

I will post my 50-udev.rules if you think it might help. This is from my desktop and is more or less unchanged. I had been editing files on the laptop more.

Before I ran out of gas last night I was going to try to create a new 90-libgphoto2.rules file using /usr/bin/print-camera-list. Why not

My 50-udev.rules file:

Code:
# /etc/udev/udev.rules:  device naming rules for udev
#
# There are a number of modifiers that are allowed to be used in some of the
# fields.  See the udev man page for a full description of them.
#
# This rules file is a mix of 10.2 Slackware udev.rules file and some
# rules from the udev examples. 
#

# sysfs is populated after the event is sent
ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"

# all block devices
SUBSYSTEM=="block", GROUP="disk"

# permissions for IDE floppy devices
SUBSYSTEMS=="ide", KERNEL=="*[!0-9]", ENV{DRIVER}=="ide-floppy*", NAME="%k", GROUP="floppy", MODE="0660"

# permissions for SCSI sg/tape devices
SUBSYSTEMS=="scsi", KERNEL=="s[gt][0-9]*", ATTRS{type}=="5", NAME="%k", GROUP="cdrom", MODE="0660"

# load modules to scsi disks, if they aren't in kernel
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1", RUN+="/sbin/modprobe st"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"

# disk devices
KERNEL=="sd*",		NAME="%k", GROUP="disk"
KERNEL=="ataraid*",	NAME="%k", GROUP="disk"

# put all removable devices in group "plugdev"
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev"
KERNEL=="sd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev"
KERNEL=="sd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev"

# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}

ACTION!="add", GOTO="persistent_storage_end"

KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"

# type 8 devices are "Medium Changers"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"

SUBSYSTEM!="block", GOTO="persistent_storage_end"

# skip rules for inappropriate block devices
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"

# never access removable ide devices, the drivers are causing event loops on open()
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"

# for partitions import parent information
KERNEL=="*[0-9]", IMPORT{parent}="ID_*"

# by-id (hardware serial number)
KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"

KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"

# libata compat (links like hd*)
KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"

KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"

# by-path (shortest physical path)
KERNEL=="*[!0-9]|sr*", IMPORT{program}="path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
KERNEL=="st*", IMPORT{program}="path_id %p", SYMLINK+="tape/by-path/$env{ID_PATH}"
KERNEL=="sr*|st*", GOTO="persistent_storage_end"
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"

# by-label/by-uuid (filesystem properties)
KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"
IMPORT{program}="vol_id --export $tempnode"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_SAFE}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_SAFE}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"

# BIOS Enhanced Disk Device
KERNEL=="*[!0-9]", IMPORT{program}="edd_id --export $tempnode"
KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"

LABEL="persistent_storage_end"

# import optical drive properties and set CD partitions
KERNEL=="scd[a-z]|sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", NAME="%k", GROUP="cdrom", MODE="0660", RUN+="cdrom-symlinks.sh %k"

# ALSA devices
SUBSYSTEM=="sound", 		GROUP="audio"
SUBSYSTEM=="snd", 		GROUP="audio"
KERNEL=="controlC[0-9]*",	NAME="snd/%k", MODE="0666"
KERNEL=="hw[CD0-9]*",		NAME="snd/%k", MODE="0662"
KERNEL=="pcm[CD0-9]*c",		NAME="snd/%k", MODE="0662"
KERNEL=="pcm[CD0-9]*p",		NAME="snd/%k", MODE="0666"
KERNEL=="midiC[D0-9]*",		NAME="snd/%k", MODE="0666"
KERNEL=="timer",		NAME="snd/%k", MODE="0666"
KERNEL=="seq",			NAME="snd/%k", MODE="0666"

# IEEE1394 raw devices (often used for video)
KERNEL=="raw1394", NAME="%k", GROUP="video"
KERNEL=="dv1394*", NAME="dv1394/%n", GROUP="video"
KERNEL=="video1394*", NAME="video1394/%n", GROUP="video"

# capi devices
KERNEL=="capi",		NAME="capi20", SYMLINK+="isdn/capi20"
KERNEL=="capi*",	NAME="capi/%n"

# cpu devices
KERNEL=="cpu[0-9]*",	NAME="cpu/%n/cpuid"
KERNEL=="msr[0-9]*",	NAME="cpu/%n/msr"
KERNEL=="microcode",	NAME="cpu/microcode"

# floppy devices
KERNEL=="fd[0-9]*", NAME="floppy/%n", SYMLINK+="%k", GROUP="floppy", PROGRAM="/lib/udev/floppy-extra-devs.sh %k %b %n"

# i2c devices
KERNEL=="i2c-[0-9]*",	NAME="i2c/%n", SYMLINK+="%k"

# persistent input links: /dev/input/{by-id,by-path}

ACTION!="add", GOTO="persistent_input_end"
SUBSYSTEM!="input", GOTO="persistent_input_end"
KERNEL=="input[0-9]*", GOTO="persistent_input_end"

# usb devices
SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x"
SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"

# other devices
DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"

ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="", ENV{ID_SERIAL}="noserial"

# by-id
KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"

# by-path
IMPORT{program}="path_id %p"
ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"

LABEL="persistent_input_end"

# input devices
KERNEL=="mice",		NAME="input/%k", MODE="0644", SYMLINK+="mouse"
KERNEL=="mouse*",	NAME="input/%k", MODE="0644"
KERNEL=="event*",	NAME="input/%k", MODE="0640"
KERNEL=="js*",		NAME="input/%k", MODE="664"
KERNEL=="ts*",		NAME="input/%k", MODE="0600"
KERNEL=="input[0-9]*", ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev"

# loop devices
KERNEL=="loop[0-9]*",	NAME="loop/%n", SYMLINK+="%k", GROUP="disk"

# md block devices
KERNEL=="md[0-9]*",	NAME="md/%n", SYMLINK+="%k", GROUP="disk"

# aoe char devices,
SUBSYSTEM=="aoe", KERNEL=="discover",	NAME="etherd/%k", GROUP="disk", MODE="0220"
SUBSYSTEM=="aoe", KERNEL=="err",	NAME="etherd/%k", GROUP="disk", MODE="0440"
SUBSYSTEM=="aoe", KERNEL=="interfaces",	NAME="etherd/%k", GROUP="disk", MODE="0220"

# netlink devices
KERNEL=="route",	NAME="netlink/%k"
KERNEL=="skip",		NAME="netlink/%k"
KERNEL=="usersock",	NAME="netlink/%k"
KERNEL=="fwmonitor",	NAME="netlink/%k"
KERNEL=="tcpdiag",	NAME="netlink/%k"
KERNEL=="nflog",	NAME="netlink/%k"
KERNEL=="xfrm",		NAME="netlink/%k"
KERNEL=="arpd",		NAME="netlink/%k"
KERNEL=="route6",	NAME="netlink/%k"
KERNEL=="ip6_fw",	NAME="netlink/%k"
KERNEL=="dnrtmsg",	NAME="netlink/%k"
KERNEL=="tap*",		NAME="netlink/%k"

# ramdisk devices
KERNEL=="ram[0-9]*",	NAME="rd/%n", SYMLINK+="%k"

# raw devices
KERNEL=="raw[0-9]*",	NAME="raw/%k", GROUP="disk"
KERNEL=="ram*",		NAME="%k", GROUP="disk"

# sound devices
KERNEL=="adsp",			NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="adsp[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="audio",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="audio[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="dsp",			NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="dsp[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="mixer",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="mixer[0-9]*",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="sequencer",		NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="sequencer[0-9]*",	NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"

# tty devices
KERNEL=="console",	NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="tty",		NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="tty[0-9]*",	NAME="vc/%n",  SYMLINK+="%k", GROUP="tty"

# serial or dialout devices
KERNEL=="ttyS[0-9]*",	NAME="tts/%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ttyUSB[0-9]*",	NAME="tts/USB%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ippp0",	NAME="%k", GROUP="uucp"
KERNEL=="isdn*",	NAME="%k", GROUP="uucp"
KERNEL=="dcbri*",	NAME="%k", GROUP="uucp"
KERNEL=="ircomm*",	NAME="%k", GROUP="uucp"

# pty devices
KERNEL=="ptmx",			NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="pty[p-za-e][0-9a-f]*",	NAME="pty/m%m", SYMLINK+="%k", GROUP="tty"
KERNEL=="tty[p-za-e][0-9a-f]*",	NAME="pty/s%m", SYMLINK+="%k", GROUP="tty"

# vc devices
KERNEL=="vcs",		NAME="vcc/0",	SYMLINK+="%k", GROUP="tty"
KERNEL=="vcs[0-9]*",	NAME="vcc/%n",	SYMLINK+="%k", GROUP="tty"
KERNEL=="vcsa",		NAME="vcc/a0",	SYMLINK+="%k", GROUP="tty"
KERNEL=="vcsa[0-9]*",	NAME="vcc/a%n",	SYMLINK+="%k", GROUP="tty"

# memory devices
KERNEL=="random",	NAME="%k", MODE="0664"
KERNEL=="urandom",	NAME="%k", MODE="0664"
KERNEL=="mem",		NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="kmem",		NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="port",		NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="nvram",	NAME="%k", GROUP="kmem", MODE="600"
KERNEL=="full",		NAME="%k", MODE="0666"
KERNEL=="null",		NAME="%k", MODE="0666"
KERNEL=="zero",		NAME="%k", MODE="0666"

# misc devices
KERNEL=="agpgart",	NAME="misc/%k", SYMLINK+="%k"
KERNEL=="psaux",	NAME="misc/%k", SYMLINK+="%k"
KERNEL=="rtc",		NAME="misc/%k", SYMLINK+="%k", MODE="0664"
KERNEL=="uinput",	NAME="misc/%k", SYMLINK+="%k"
KERNEL=="inotify",	NAME="misc/%k", SYMLINK+="%k", MODE="0666"

# usb devices
KERNEL=="hiddev*",		NAME="usb/%k"
KERNEL=="auer*",		NAME="usb/%k"
KERNEL=="legousbtower*",	NAME="usb/%k"
KERNEL=="dabusb*",		NAME="usb/%k"

# fb devices
KERNEL=="fb[0-9]*",	NAME="fb/%n", SYMLINK+="%k", GROUP="video"

# DRI devices
KERNEL=="card*",	NAME="dri/card%n", GROUP="video"
KERNEL=="nvidia*",	NAME="%k", GROUP="video"
KERNEL=="3dfx*",	NAME="%k", GROUP="video"

# v4l devices
KERNEL=="video[0-9]*",	NAME="v4l/video%n", SYMLINK+="video%n", GROUP="video"
KERNEL=="radio[0-9]*",	NAME="v4l/radio%n", SYMLINK+="radio%n", GROUP="video"
KERNEL=="vbi[0-9]*",	NAME="v4l/vbi%n", SYMLINK+="vbi%n", GROUP="video"
KERNEL=="vtx[0-9]*",	NAME="v4l/vtx%n", GROUP="video"

# dvb devices
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'X=%k; X=$${X#dvb}; A=$${X%%%%.*}; D=$${X#*.}; echo dvb/adapter$$A/$$D'", NAME="%c", GROUP="video"

# Asterix Zaptel devices
KERNEL=="zapctl",	NAME="zap/ctl"
KERNEL=="zaptimer",	NAME="zap/timer"
KERNEL=="zapchannel",	NAME="zap/channel"
KERNEL=="zappseudo",	NAME="zap/pseudo"
KERNEL=="zap[0-9]*",	NAME="zap/%n"

# pilot/palm devices
KERNEL=="pilot",	NAME="%k", GROUP="uucp"

# jaz devices
KERNEL=="jaz*",		NAME="%k", GROUP="disk"

# zip devices
KERNEL=="pocketzip*",	NAME="%k", GROUP="disk"
KERNEL=="zip*",		NAME="%k", GROUP="disk"

# ls120 devices
KERNEL=="ls120",	NAME="%k", GROUP="disk"

# lp devices
KERNEL=="irlpt",	NAME="%k", GROUP="lp", MODE="0664"
SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp", MODE="0664"
SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp", MODE="0664"
KERNEL=="parport*",	NAME="%k", GROUP="lp", MODE="0664"

# tape devices
KERNEL=="ht*",		NAME="%k"
KERNEL=="nht*",		NAME="%k"
KERNEL=="pt*",		NAME="%k"
KERNEL=="npt*",		NAME="%k"
KERNEL=="st*",		NAME="%k"
KERNEL=="nst*",		NAME="%k"
KERNEL=="osst*",	NAME="%k"
KERNEL=="nosst*",	NAME="%k"

# diskonkey devices
KERNEL=="diskonkey*",	NAME="%k", GROUP="disk"

# rem_ide devices
KERNEL=="microdrive*",	NAME="%k", GROUP="disk"

# kbd devices
KERNEL=="kbd",		NAME="%k", MODE="0664"

# Sony Vaio Jogdial sonypi device
KERNEL=="sonypi",	NAME="%k", MODE="0666"

# packet devices
KERNEL=="pktcdvd",		NAME="pktcdvd/control", GROUP="cdrom", MODE="0660"
KERNEL=="pktcdvd[0-9]*",	NAME="pktcdvd/pktcdvd%n", GROUP="cdrom", MODE="0660"

# infiniband devices
KERNEL=="umad*",	NAME="infiniband/%k"
KERNEL=="issm*", NAME="infiniband/%k"

# i82365 is broken, and puts udev in a terrible loop.  To fix that, we
# will ignore the platform provided module, and stop the loop:
SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="load_modules_end"

# PnP
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \
        RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'"

# firewire
SUBSYSTEM=="ieee1394", ENV{MODALIAS}!="?*", IMPORT{program}="modalias_ieee1394"

# libusb device access
DEVPATH=="/module/usbcore", ACTION=="add", \
              RUN+="/bin/sh -c 'sleep 1; /bin/mount none -t usbfs /proc/bus/usb -o devmode=0666,devgid=10'"
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev}; B=$${X%%%%.*}; D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"

# firmware loader
SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"

# Platform
SUBSYSTEM=="platform", ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/lib/udev/modprobe.sh $env{MODALIAS}", GOTO="load_modules_end"

# load module
ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"

LABEL="load_modules_end"

# network devices
KERNEL=="tun", NAME="net/%k"

SUBSYSTEM=="net", ACTION=="add", RUN+="nethelper.sh $env{INTERFACE} start"
SUBSYSTEM=="net", ACTION=="remove", RUN+="nethelper.sh $env{INTERFACE} stop"

# catch the event in udevmonitor
RUN+="socket:/org/kernel/udev/monitor"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Canon Powershot A630 Pantherman Linux - Hardware 2 07-07-2007 04:38 PM
Canon PowerShot A400 - does anyone use it? ditch* Linux - General 7 03-31-2006 09:41 PM
gphoto2 can't detect canon powershot a95 $in Slackware 11 11-30-2005 04:58 AM
How to get my Canon powershot working woopud Slackware 6 10-01-2005 12:41 AM
canon power shot a95 not recognized fof3 Linux - Newbie 17 09-28-2005 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration