xsane and simple-scan only working as root
Marius Gedminas
marius at pov.lt
Tue Oct 22 05:23:46 UTC 2013
On Tue, Oct 22, 2013 at 04:37:34AM +0100, Christian Jaeger wrote:
> I can't figure out why xsane and simple-scan only work as root, on Ubuntu
> 13.10. The programs report that they don't find a scanner if run as normal
> user. I've tried 'adduser normaluser scanner' as well as 'adduser
> normaluser saned' and 'adduser saned scanner', then 'sux - normaluser' to
> get the new group ids before starting xsane / simple-scan, to no avail.
>
> Anyone knows the solution?
FWIW 'newgrp scanner' is the canonical way of activating the new group
in a subshell, if you don't want to log out and log back in.
IIRC the way scanners work is that
1. you plug in a scanner
2. udev notices a new device and runs some scripts
3. that check for users who are logged in locally (using ConsoleKit in
older Ubuntus, probably using logind in 13.10)
4. and grant access to those users via filesystem access control lists
on the device (you can see those with getfacl /dev/... if you know
the scanner device name)
I've encountered a bug (twice) where somehow ConsoleKit lost track of my
user session (running ck-list-sessions did not show my login), and as a
result I could not use the scanner. Logging out and logging back in
fixed this. That was in an older Ubuntu version.
I don't think 13.04 uses ConsoleKit any more (ck-list-sessions produces
empty output right now for me, and I see a systemd-logind process
running). I hope whichever component is responsible for setting up
scanner access has been updated accordingly.
What's a bit frustrating is that I can't _find_ the script responsible
for this. /lib/udev/rules.d/40-libsane.rules only does
/bin/setfacl -m g:scanner:rw $DEVNAME
i.e. grants the scanner group access.
Do you know your scanner device name? Can you check the permissions
with getfacl?
Marius Gedminas
--
Dijkstra probably hates me
-- Linus Torvalds, in kernel/sched.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20131022/23e63d6d/attachment.sig>
More information about the ubuntu-users
mailing list