Write suggestions and new ideas in here
More ideas here
Forum rules
  • Only post ideas here that are specifically about the Linux Mint distribution or its websites.
  • So that developers and users from any distribution can discuss ideas in one place, post ideas about improving software to the collaboration website for that software instead.
Level 1
Level 1
Posts: 3
Joined: Thu Feb 18, 2016 4:58 pm

Re: Scanners

Post by ParisYank »

Bravo, xfrank

I spent hours trying to solve this problem of XSane access to my Brother MFC-J870DW scanner on Linux Mint 18 Cinnamon.
$ sudo cd /dev/bus/usb/003
$ sudo chmod 666 002

or just:

$ sudo chmod 666 /dev/bus/usb/003/002

Scanimage need to fix the message when it can not access the scanner to have the right bus and dev number and also tell the user that the problem is a write access problem.
Your solution worked in 10 seconds after I identified the scanner bus & port. Thanks for your post. :D :shock: :D
Level 1
Level 1
Posts: 22
Joined: Sat Jul 11, 2015 12:34 pm

Re: Scanners

Post by tlmcca »

I'm running Linux Mint 17.3 Rosa Cinnamon and using a Brother MFC-L2700DW and I found a post identifying changing the <dev>/<bus> permissions to 666 as part of the set up for using xsane. That eliminated the "Invalid argument" error when starting xsane. However, the <dev>/<bus> assignment seems to change periodically even though I'm not rebooting or recabling the device. Since I was unable to find and correct the issue I wrote the following script to run out of root's crontab on a daily basis to assure permissions are set to 666:

# This script changes permissions on the dev file associated with the multi-funcion printer
# to allow the xsane software access. The script must run as root passing on parameter which
# is used to identify the printer in the output from the lsusb command.
# The text which will identify the line from the lsusb output associated with the scanner is passed
# as the one and only parameter:
# /home/bin/change_permissions_for_MFP.bash Brother

echo "`date`" >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt

if [ ${#*} -ne 1 ]
echo "There must be 1 and only parm passed" >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt

BUS_DEV=`lsusb |grep $1 |tr -d ':' |awk '{print $2, $4}'`

if [ `echo $BUS_DEV |wc -w` -ne 2 ]
echo "Unexpected result from lsusb command" >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt

BUS=`echo "$BUS_DEV" |awk '{print $1}'`
DEV=`echo "$BUS_DEV" |awk '{print $2}'`

echo "BUS=$BUS DEV=$DEV" >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt

echo "State before chmod:" >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt
ls -l /dev/bus/usb/$BUS/$DEV >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt

chmod a+w /dev/bus/usb/$BUS/$DEV

echo "State after chmod:" >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt
ls -l /dev/bus/usb/$BUS/$DEV >> /home/terry/Documents/change_permissions_for_MFP_BUS-DEV_history.txt

Feel free to use it if you wish and post any improvements.

Post Reply

Return to “Suggestions & New Ideas”