LINUX.ORG.RU

Workcentre 3119, xsane


0

0

Ubuntu 9.10, настраиваю сабжевое МФУ. Печать работает «из коробки», со сканером пришлось повозиться

$ sane-find-scanner
found USB scanner (vendor=0x0924, product=0x4265) at libusb:001:009

Погуглив, добавляю в /lib/udev/rules.d/40-libsane.rules:

# Xerox WorkCentre 3119
ATTRS{idVendor}=="0924", ATTRS{idProduct}=="4265", ENV{libsane_matched}="yes"
и в /etc/sane.d/xerox_mfp.conf:
#Xerox WorkCentre 3119.
usb 0x0924 0x4265

Теперь сканер работает, если запускать xsane через gksu, иначе

$ xsane
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect

ЧЯДНТ? Как добиться корректной работы из-под обычного пользователя?

★★★★★
Ответ на: комментарий от eugeneblack

Да, добавил в группы lp и saned - не помогает.

Еще такое обнаружил:

$ saned -d
[saned] main: starting debug mode (level 2)
[saned] saned (AF-indep+IPv6) from sane-backends 1.0.20 starting up
[saned] do_bindings: [0] bind failed: Address already in use
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
^C

fluorite ★★★★★
() автор топика

http://newyork.ubuntuforums.org/showthread.php?p=8362346

...

In 9.10, it seems the way the scanner is made available to non root users has changed in ways that are not clearly documented. In 9.04, I believe the HAL daemon (hald) used to take care of the detection of the scanner and setting the permissions for normal users but I recall reading somewhere that in 9.10 this method is now «deprecated» and udev is used instead. I don't pretend to know what this means, but it gave me a clue to a workaround that got my 4490 scanner working for normal users again in 9.10 64 bit.

The clue was that udev is now used. I looked in /lib/udev/rules.d and found a rules file «50-udev-default.rules» and it had a line for usb ports that said:

SUBSYSTEM==«usb», ENV{DEVTYPE}==«usb_device», MODE=«0664»

This was at line 58 in my rules file. I changed the MODE= entry to read MODE=«0666» and saved the file (you have to edit this file as the root user as it is a system file). Basically this change makes all usb ports readable and writable by ordinary users.

I documented this change with comments so the full change now looks like this:

# libusb device nodes
# Changed MODE to 0666, instead of 0664, so scanner would work
# for normal user and not just root. RJ Oct 29, 2009.
SUBSYSTEM==«usb», ENV{DEVTYPE}==«usb_device», MODE=«0666»

You don't have to reboot or logoff for this change to take effect. Just turn your scanner on and off or unplug and replug its usb cord and the system will re-detect the scanner using the new permissions.

I also tried to make a rule in the /etc/udev/rules.d folder, which is normally where one would make changes for a specific device but I couldn't manage to concoct a rule that worked. Only the change to the «50-udev-default.rules» file in the /lib/udev/rule.d worked for me.

Give it a try, it may work for you as well.

Bod ★★★★
()
Ответ на: комментарий от Bod

Cпасибо!

$ diff /lib/udev/rules.d/50-udev-default.rules 50-udev-default.rules.old 
58c58
< SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
---
> SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"

fluorite ★★★★★
() автор топика
Ответ на: комментарий от Bod

true way - это не chmod 0666, а прописывание в нужную группу.

Deleted
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.