How to configure your SCSI or USB scanner to work with SANE/XSANE from your regular user account
|
Submitted by VirtualEntity (Contact Author) (Forums) on Thu, 2007-04-05 15:44. :: Linux | Desktop | Other
How to configure your SCSI or USB scanner to work with SANE/XSANE from your regular user accountVersion 1.0 When I try to run XSANE, the program reports "No devices found" and doesn't see my scanner. When I run sane-find-scanner, the same thing happens and the program reports that no scanners were found.In the words of Linux Format Magazine, "Unix is traditionally rather restrictive about users accessing physical devices, so everything is split up into multipe groups in order for granular access to be provided." In other words, this is one of those "permissions things". Since root has access to everything, it should be no surprise that root has no problem getting to the scanner. Normal users, however, have very limited access to devices, so it will be necessary to grant your particular user account access to the scanner (or any other device that it otherwise would not have access to.) For the purposes of this howto, we will consider my scanner, an HP C2520A 3644 SCSI scanner that I found in the trash a few years ago and put aside (and, boy, am I glad I did!). First of all, I needed to "find" my scanner, that is, to find out what device it is using. Obviously, if you have read the problem description, using sane-find-scanner from my regular account does me no good at all. But, running this command as root should work: [root@berlin dev]# sane-find-scanner found SCSI processor "HP C2520A 3644" at /dev/sg0 # No USB scanners found. If you expected something different, make sure that Okay, now we know that the scanner is identified by the system as /dev/sg0. Now, we need to know the user and group that owns /dev/sg0: [root@berlin dev]# ls -al sg0 crw-rw---- 1 root disk 21, 0 Apr 16 07:02 sg0 user -------| |--------group Okay, now we know that the group to which /dev/sg0 belongs is disk. In the case of a USB scanner, this will probably be different, e.g. it might be /dev/usb, /dev/scanner or even something else. The point is, you can use the above technique to find your scanner whereever it lurks. Now, the next step is simply to add your user account to the disk group. Either edit /etc/group and add your username (vmorgo in my case) to the line of /etc/group beginning with disk like so: root:x:0:root bin:x:1:root,bin,daemon daemon:x:2:root,bin,daemon sys:x:3:root,bin,adm adm:x:4:root,adm,daemon tty:x:5: disk:x:6:root,vmorgo or simply use usermod to do the trick. When using groupadd, the command would be: usermod -G samba,disk vmorgo assuming that you are already (and wish to remain) a member of the group samba. Remember that omitting the groups you are ALREADY a member of when using the usermod command will result in DELETING your account from those groups! When you are done and have saved your changes, you will need to log out and log back in again for the new permissions to take effect. (How very Windows....) NOTE:
|






Recent comments
54 min 39 sec ago
4 hours 12 min ago
15 hours 2 min ago
16 hours 2 min ago
17 hours 31 min ago
19 hours 19 min ago
21 hours 21 min ago
22 hours 58 min ago
23 hours 57 min ago
1 day 2 hours ago