我有一台 Brother 多功能一体打印机/扫描仪MFC-2700DW 我可以从生产商页面上的 Linux 驱动程序下载甚至安装 DEB 包。但是,当我尝试使用简单扫描进行扫描时,我收到错误。如果我以 root 身份运行简单扫描
sudo simple-scan
然后它就可以扫描了。这似乎是驱动程序错误地假定了错误的权限的问题。
为了使其更清洁,我正在尝试在 live-usb ubuntu 上安装驱动程序:
ubuntu@ubuntu:~$ lsusb
Bus 002 Device 004: ID 04f9:0331 Brother Industries, Ltd
Bus 002 Device 003: ID 1c4f:0034 SiGma Micro
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 05e3:0732 Genesys Logic, Inc. All-in-One Cardreader
Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0781:5530 SanDisk Corp. Cruzer
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
如果我以非 root 身份运行它,我会得到核心转储或“无法连接到扫描仪”。但是,如果我以 sudo 身份启动它,一切正常
以下是我以非 root 身份启动时的调试日志简单扫描-d
[+6.46s] DEBUG: scanner.vala:341: sane_get_devices () -> SANE_STATUS_GOOD
[+6.46s] DEBUG: scanner.vala:353: Device: name="brother4:bus2;dev6" vendor="Brother" model="MFC-L2700DW" type="USB scanner"
[+6.56s] DEBUG: app-window.vala:1775: Saving state to /home/ubuntu/.cache/simple-scan/state
[+18.04s] DEBUG: app-window.vala:1775: Saving state to /home/ubuntu/.cache/simple-scan/state
...
[+24.53s] DEBUG: simple-scan.vala:454: Requesting scan at 300 dpi from device 'brother4:bus2;dev6'
[+24.53s] DEBUG: scanner.vala:1569: Scanner.scan ("brother4:bus2;dev6", dpi=300, scan_mode=ScanMode.COLOR, depth=8, type=ScanType.SINGLE, paper_width=0, paper_height=0, brightness=0, contrast=0, delay=10000ms)
[+24.53s] DEBUG: scanner.vala:806: Processing request
[+24.53s] DEBUG: scanner.vala:867: sane_open ("brother4:bus2;dev6") -> SANE_STATUS_IO_ERROR
[+24.53s] WARNING: scanner.vala:871: Unable to get open device: Error during device I/O
[+24.63s] DEBUG: app-window.vala:1775: Saving state to /home/ubuntu/.cache/simple-scan/state
...
程序错误似乎是:sane_open(“brother4:bus2; dev6”)-> SANE_STATUS_IO_ERROR 无法获取打开的设备:设备 I/O 期间出错
答案1
用户应属于扫描仪组。使用 控制它id
这样可以避免使用 sudo 启动扫描程序。sudo usermod -a -G scanner USERNAME
对于 USERNAME 选择你的用户名。注销并重新登录。这仅在已安装的系统中可行,而不是在实时会话中
编辑:我错了,我忘了newgrp scanner
你在群组扫描仪中。