LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-25-2007, 11:38 PM   #16
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,519

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873

PiterPunk,

I will try the rules tonight after work.
It looks as though you have edited the files to use ATTR in place of SYSFS.
I did try commenting out the line for my Brother DCP-110C in 80-libsane.rules and replacing it with a line with ATTR in place of SYSFS, but I still needed to apply the custom rule to set the privileges.
 
Old 10-25-2007, 11:40 PM   #17
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Original Poster
Rep: Reputation: 89
ok, thanks Robby and Piter for your help!
I think we have a decent solution for this little problem now :-)
 
Old 10-26-2007, 08:19 AM   #18
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Original Poster
Rep: Reputation: 89
To Robby and Piter:
I forgot to mention that I changed the line just a little. Instead of:
Code:
GROUP:="plugdev" MODE:="0664"
I entered:
Code:
GROUP="plugdev" MODE="0664"
I had never seen the syntax using := so I imagined it might have been a typo.

Now a more generic doubt:
This works fine for my scanner. But what about any other equipment? If I buy another scanner / digital camera / whatever, do I need to add a new custom rule like this? Or is there a generic rule I can change?
 
Old 10-26-2007, 09:12 AM   #19
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
Quote:
Originally Posted by niels.horn View Post
To Robby and Piter:
I forgot to mention that I changed the line just a little. Instead of:
Code:
GROUP:="plugdev" MODE:="0664"
I entered:
Code:
GROUP="plugdev" MODE="0664"
I had never seen the syntax using := so I imagined it might have been a typo.
That's valid syntax - it prevents the assigned values from being overridden by later rules.
I figured it probably wasn't necessary, but at the time, it couldn't hurt

Quote:
Now a more generic doubt:
This works fine for my scanner. But what about any other equipment? If I buy another scanner / digital camera / whatever, do I need to add a new custom rule like this? Or is there a generic rule I can change?
Well, that depends. It appears that the sane, libgphoto2, and probably other upstream guys need to issue new releases with udev rules that work with current udev versions. As for what Pat will do until that happens, I don't know.
 
Old 10-26-2007, 10:47 AM   #20
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,519

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Piter Punk,

Thanks for your involvement in this as well as all the good work you do to benefit us all!

To other readers, I apologise for the long post.

This is the results of the testing that I have done.

First- Output of lsusb and ls -l when /etc/udev/rules.d contains the defaults in Slackware current where my Brother DCP-110C scanner is not available to users other than root.
Quote:
~$ /sbin/lsusb
Bus 006 Device 001: ID 0000:0000
Bus 007 Device 004: ID 0424:2504 Standard Microsystems Corp.
Bus 007 Device 001: ID 0000:0000
Bus 005 Device 002: ID 04f9:0169 Brother Industries, Ltd
Bus 005 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 004 Device 005: ID 413c:2105 Dell Computer Corp.
Bus 004 Device 004: ID 0461:4d15 Primax Electronics, Ltd
Bus 004 Device 001: ID 0000:0000
~$ ls -l /dev/usbdev5*
crw-rw---- 1 root root 189, 512 2007-10-27 10:11 /dev/usbdev5.1
crw-rw---- 1 root root 254, 8 2007-10-27 10:11 /dev/usbdev5.1_ep00
crw-rw---- 1 root root 254, 9 2007-10-27 10:11 /dev/usbdev5.1_ep81
crw-rw---- 1 root scanner 189, 513 2007-10-27 00:11 /dev/usbdev5.2
crw-rw---- 1 root root 254, 20 2007-10-27 00:11 /dev/usbdev5.2_ep00
crw-rw---- 1 root root 254, 21 2007-10-27 00:11 /dev/usbdev5.2_ep01
crw-rw---- 1 root root 254, 23 2007-10-27 00:11 /dev/usbdev5.2_ep03
crw-rw---- 1 root root 254, 26 2007-10-27 00:11 /dev/usbdev5.2_ep08
crw-rw---- 1 root root 254, 22 2007-10-27 00:11 /dev/usbdev5.2_ep82
crw-rw---- 1 root root 254, 24 2007-10-27 00:11 /dev/usbdev5.2_ep84
crw-rw---- 1 root root 254, 25 2007-10-27 00:11 /dev/usbdev5.2_ep85
crw-rw---- 1 root root 254, 27 2007-10-27 00:11 /dev/usbdev5.2_ep89
~$ ls -l /dev/bus/usb/005
total 0
crw-r--r-- 1 root root 189, 512 2007-10-27 10:11 001
crw-r--r-- 1 root root 189, 513 2007-10-27 00:11 002
Second- Output of lsusb and ls -l when /etc/udev/rules.d contains the defaults in Slackware current _and_ the custom rule in 90-local.rules where my Brother DCP-110C scanner _is_ available to users other than root.
Quote:
~$ /sbin/lsusb
Bus 002 Device 001: ID 0000:0000
Bus 006 Device 003: ID 413c:2105 Dell Computer Corp.
Bus 006 Device 002: ID 0461:4d15 Primax Electronics, Ltd
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 007 Device 002: ID 04f9:0169 Brother Industries, Ltd
Bus 007 Device 001: ID 0000:0000
Bus 004 Device 004: ID 0424:2504 Standard Microsystems Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
~$ ls -l /dev/usbdev7*
crw-rw---- 1 root root 189, 768 2007-10-27 10:02 /dev/usbdev7.1
crw-rw---- 1 root root 254, 12 2007-10-27 10:02 /dev/usbdev7.1_ep00
crw-rw---- 1 root root 254, 13 2007-10-27 10:02 /dev/usbdev7.1_ep81
crw-rw---- 1 root scanner 189, 769 2007-10-27 00:02 /dev/usbdev7.2
crw-rw---- 1 root root 254, 20 2007-10-27 00:02 /dev/usbdev7.2_ep00
crw-rw---- 1 root root 254, 21 2007-10-27 00:02 /dev/usbdev7.2_ep01
crw-rw---- 1 root root 254, 23 2007-10-27 00:03 /dev/usbdev7.2_ep03
crw-rw---- 1 root root 254, 26 2007-10-27 00:02 /dev/usbdev7.2_ep08
crw-rw---- 1 root root 254, 22 2007-10-27 00:02 /dev/usbdev7.2_ep82
crw-rw---- 1 root root 254, 24 2007-10-27 00:03 /dev/usbdev7.2_ep84
crw-rw---- 1 root root 254, 25 2007-10-27 00:03 /dev/usbdev7.2_ep85
crw-rw---- 1 root root 254, 27 2007-10-27 00:02 /dev/usbdev7.2_ep89
~$ ls -l /dev/bus/usb/007
total 0
crw-r--r-- 1 root root 189, 768 2007-10-27 10:02 001
crw-rw---- 1 root scanner 189, 769 2007-10-27 00:03 002
Third- Output of lsusb and ls -l when /etc/udev/rules.d contains the defaults in Slackware current as well as your new rules where my Brother DCP-110C scanner is not available to users other than root.
Quote:
~$ /sbin/lsusb
Bus 007 Device 002: ID 04f9:0169 Brother Industries, Ltd
Bus 007 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 006 Device 003: ID 413c:2105 Dell Computer Corp.
Bus 006 Device 002: ID 0461:4d15 Primax Electronics, Ltd
Bus 006 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 004: ID 0424:2504 Standard Microsystems Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
~$ ls -l /dev/usbdev7*
crw-rw---- 1 root root 189, 768 2007-10-27 09:17 /dev/usbdev7.1
crw-rw---- 1 root root 253, 12 2007-10-27 09:17 /dev/usbdev7.1_ep00
crw-rw---- 1 root root 253, 15 2007-10-27 09:17 /dev/usbdev7.1_ep81
crw-rw---- 1 root root 189, 769 2007-10-26 23:17 /dev/usbdev7.2
crw-rw---- 1 root root 253, 20 2007-10-26 23:17 /dev/usbdev7.2_ep00
crw-rw---- 1 root root 253, 21 2007-10-26 23:17 /dev/usbdev7.2_ep01
crw-rw---- 1 root root 253, 23 2007-10-26 23:17 /dev/usbdev7.2_ep03
crw-rw---- 1 root root 253, 26 2007-10-26 23:17 /dev/usbdev7.2_ep08
crw-rw---- 1 root root 253, 22 2007-10-26 23:17 /dev/usbdev7.2_ep82
crw-rw---- 1 root root 253, 24 2007-10-26 23:17 /dev/usbdev7.2_ep84
crw-rw---- 1 root root 253, 25 2007-10-26 23:17 /dev/usbdev7.2_ep85
crw-rw---- 1 root root 253, 27 2007-10-26 23:17 /dev/usbdev7.2_ep89
~$ ls -l /dev/bus/usb/007/
total 0
crw-r--r-- 1 root root 189, 768 2007-10-27 09:17 001
crw-r--r-- 1 root root 189, 769 2007-10-26 23:17 002
Fourth- Output of lsusb and ls -l when /etc/udev/rules.d contains the defaults in Slackware current as well as your new rules _and_ the custom rule in 90-local.rules where my Brother DCP-110C scanner _is_ available to users other than root.
Quote:
~$ /sbin/lsusb
Bus 006 Device 001: ID 0000:0000
Bus 007 Device 004: ID 0424:2504 Standard Microsystems Corp.
Bus 007 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 002: ID 04f9:0169 Brother Industries, Ltd
Bus 005 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 005: ID 413c:2105 Dell Computer Corp.
Bus 004 Device 004: ID 0461:4d15 Primax Electronics, Ltd
Bus 004 Device 001: ID 0000:0000
~$ ls -l /dev/usbdev5*
crw-rw---- 1 root root 189, 512 2007-10-27 09:38 /dev/usbdev5.1
crw-rw---- 1 root root 253, 8 2007-10-27 09:38 /dev/usbdev5.1_ep00
crw-rw---- 1 root root 253, 9 2007-10-27 09:38 /dev/usbdev5.1_ep81
crw-rw---- 1 root root 189, 513 2007-10-26 23:38 /dev/usbdev5.2
crw-rw---- 1 root root 253, 20 2007-10-26 23:38 /dev/usbdev5.2_ep00
crw-rw---- 1 root root 253, 21 2007-10-26 23:38 /dev/usbdev5.2_ep01
crw-rw---- 1 root root 253, 23 2007-10-26 23:40 /dev/usbdev5.2_ep03
crw-rw---- 1 root root 253, 26 2007-10-26 23:38 /dev/usbdev5.2_ep08
crw-rw---- 1 root root 253, 22 2007-10-26 23:38 /dev/usbdev5.2_ep82
crw-rw---- 1 root root 253, 24 2007-10-26 23:40 /dev/usbdev5.2_ep84
crw-rw---- 1 root root 253, 25 2007-10-26 23:40 /dev/usbdev5.2_ep85
crw-rw---- 1 root root 253, 27 2007-10-26 23:38 /dev/usbdev5.2_ep89
~$ ls -l /dev/bus/usb/005/
total 0
crw-r--r-- 1 root root 189, 512 2007-10-27 09:38 001
crw-rw---- 1 root scanner 189, 513 2007-10-26 23:40 002
In summary, the new rules work with my scanner (I cannot comment on the other rule sets as I have no way to test).
The change from SYSFS to ATTR does have have an effect on privileges at the /dev/usbdev* level, but the use of a custom rule allows the privileges to be set at the /dev/bus/usb/* level so that the scanner can be used by users other than root via programs such as scanimage, xsane and kooka.

Last edited by allend; 10-26-2007 at 10:52 AM.
 
Old 11-25-2007, 06:16 AM   #21
shaney
LQ Newbie
 
Registered: Nov 2007
Posts: 1

Rep: Reputation: 0
Post

I solved this problem changing in /etc/udev/rules.d/80-libsane.rules

Code:
SUBSYSTEM!="usb_device", GOTO="libsane_rules_end"
with

Code:
SUBSYSTEM!="usb", GOTO="libsane_rules_end"
 
Old 05-20-2008, 07:17 PM   #22
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,489

Rep: Reputation: Disabled
I am still having this problem. I have not yet replied to this post, because I had to role back to an older kernel due to my wireless card, and I was afraid that was why these solutions weren't working. Anyway, I've got the card working on 2.6.25, so I'd like to fix this problem now.

I have tried all the solutions mentioned here to no avail. The only thing here that changes my computer's behavior at all is Piter Punk's rules, which cause the /dev/usb* entry to show root group instead of scanner group.

One thing I notice is that you are all talking about /dev/bus/usb/xxx/yyy, but on my computer I do not have this directory, rather I have /proc/bus/usb/xxx/yyy. So do I have a misconfigured kernel? Everything else is stock slackware. This is not an upgrade from a prior Slack version (well, it is an upgrade from 12.1 rc1 or rc2).

Brian
 
Old 05-21-2008, 04:40 AM   #23
digger95
Member
 
Registered: Oct 2007
Location: Indiana, PA
Distribution: Slackware 14
Posts: 330

Rep: Reputation: 45
Quote:
Originally Posted by BCarey View Post
One thing I notice is that you are all talking about /dev/bus/usb/xxx/yyy, but on my computer I do not have this directory, rather I have /proc/bus/usb/xxx/yyy.
As a point of reference I have both on my machine. Sorry to hear you're still having problems. All I had to do was add my username to the 'scanner' group and my HP Scanjet (usb) worked out of the box.
 
Old 11-16-2008, 12:04 PM   #24
gbloon
Member
 
Registered: Nov 2008
Posts: 36

Rep: Reputation: 15
I just found this thread, while trying to get my scanner working as regular user, instead of only root.
Scanner is Canon LIDE25, OS is Slackware 12.1

I found the simple solution; just add your username to the scanner group. Open /etc/group, find the line that starts "scanner", and append your username to the end of the line (after a comma if you are not the only user in this group). Then logout, and log in again (or reboot).

Posting this in case it helps someone.

Last edited by gbloon; 11-16-2008 at 12:06 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
/dev/rtc + udev in current dive Slackware 3 09-02-2006 10:37 PM
udev problems in current MS3FGX Slackware 15 08-14-2006 07:20 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 04:43 AM
scanner with udev only - possible? aspartat Linux - Hardware 0 04-24-2006 03:01 PM
How to upgrade to -current ? New udev for new kernel !? introuble Slackware 8 04-21-2006 03:47 PM


All times are GMT -5. The time now is 02:00 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration