LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-25-2017, 12:08 PM   #1
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Need help: Getting Brother printer/scanner to work in LinuxMint


I am having trouble getting LinuxMint to recognize the scanner on my Brother Printer/Scanner. Printing works fine, but "Simple Scan" does not recognize the scanner UNLESS I invoke it via sudo. Then it recognizes the scanner. Sounds like a simple permissions problem. I noticed the normal user was not in the "scanner" /etc/group. So I added the normal user to that group and logged off/on and verified that the user was now part of that group. But Simple Scan still could not access the scanner when run as a normal user.

Environment:
  • Brother printer/scanner DCP-L2540DW, connected via USB
  • LinuxMint 18.1
  • Drivers installed via Brothers tool: "linux-brprinter-installer"

Any ideas?

Also, I noted that the Simple Scan GUI looks different if invoked as root than it does if invoked as a normal user.

Here are the contents of the normal users Download directory after running the Brother driver install tool (the tool was run as root). You can see that the tool downloaded LPR debs, CUPS wrapper debs, and scanner debs as well as some uninstall tools. dpkg -l confirms that these debs were successfully installed:

Code:
$ ls -l
total 3624
-rw-r--r--  1 root  root    74110 May 23 18:24 brscan4-0.4.4-3.amd64.deb
-rw-r--r--  1 root  root    50852 Sep  4  2013 brscan-skey-0.2.4-1.amd64.deb
-rw-r--r--  1 root  root    17506 Jun 12 16:25 dcpl2540dwcupswrapper-3.2.0-1a.i386.deb
-rw-r--r--  1 root  root    18996 Jun 14  2015 dcpl2540dwcupswrapper-3.2.0-1.i386.deb
-rw-r--r--  1 root  root    26254 Jun 12 16:25 dcpl2540dwlpr-3.2.0-1a.i386.deb
-rw-r--r--  1 root  root    35576 Jun 14  2015 dcpl2540dwlpr-3.2.0-1.i386.deb
-rwxr-xr-x  1 user1 user1   94320 Jun 12 16:20 linux-brprinter-installer-2.1.1-1
-rwxr--r--  1 root  root       46 Jun 12 16:26 uninstaller_brscan4
-rwxr--r--  1 root  root       50 Jun 12 16:26 uninstaller_brscan-skey
-rwxr--r--  1 root  root     1297 Jun 12 16:26 uninstaller_DCPL2540DW
$ 
$ dpkg -l | grep Brother
ii  brscan-skey                                 0.2.4-1                                    amd64        Brother Linux scanner S-KEY tool
ii  brscan4                                     0.4.4-3                                    amd64        Brother Scanner Driver
ii  dcpl2540dwcupswrapper:i386                  3.2.0-1                                    i386         Brother DCP-L2540DW CUPS wrapper driver
ii  dcpl2540dwlpr:i386                          3.2.0-1                                    i386         Brother DCP-L2540DW LPR driver
ii  printer-driver-brlaser                      3-5~ubuntu1                                amd64        printer driver for (some) Brother laser printers
ii  printer-driver-ptouch                       1.4-1                                      amd64        printer driver Brother P-touch label printers
$
The first screenshot below is Simple Scan invoked as a normal user. The second screenshot is when it is invoked as root. Same executable: /usr/bin/simple-scan. Must be something different in the environments causing the different look of the GUIs?
Attached Thumbnails
Click image for larger version

Name:	simplescan.png
Views:	111
Size:	28.8 KB
ID:	25320   Click image for larger version

Name:	root_simplescan.png
Views:	107
Size:	17.0 KB
ID:	25321  

Last edited by haertig; 06-25-2017 at 11:06 PM.
 
Old 06-25-2017, 03:24 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,807

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
This may be helpful...
https://sites.google.com/site/easylinuxtipsproject/15
 
Old 06-25-2017, 04:05 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Original Poster
Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Thanks for that link. The article looked very promising, but the structure the article mentioned in /usr/lib64 vs /usr/lib does not exist on my system. That article must be referencing an older Brother installation. Mine doesn't match. For example, the article mentions files named libbrscandec*.so* There are no such files like that anywhere on my system. The article specifically mentions "64-bit Linux Mint 18.x" and that describes my installation 100%, but the article is wrong about existing files and their locations.

Thanks for the link though. It certainly looked promising, but the devil was in the details, and they were wrong.

Code:
# cd /
# find . -name "*brscan*" -print
./var/lib/dpkg/info/brscan-skey.list
./var/lib/dpkg/info/brscan4.list
./var/lib/dpkg/info/brscan4.md5sums
./var/lib/dpkg/info/brscan-skey.postinst
./var/lib/dpkg/info/brscan4.postrm
./var/lib/dpkg/info/brscan4.prerm
./var/lib/dpkg/info/brscan4.conffiles
./var/lib/dpkg/info/brscan4.postinst
./var/lib/dpkg/info/brscan4.preinst
./var/lib/dpkg/info/brscan-skey.prerm
./var/lib/dpkg/info/brscan-skey.md5sums
find: ‘./run/user/1000/gvfs’: Permission denied
./home/user1/Downloads/brscan-skey-0.2.4-1.amd64.deb
./home/user1/Downloads/uninstaller_brscan4
./home/user1/Downloads/uninstaller_brscan-skey
./home/user1/Downloads/brscan4-0.4.4-3.amd64.deb
./usr/bin/brscan-skey
./opt/brother/scanner/brscan-skey
./opt/brother/scanner/brscan-skey/script/brscan_scantoemail-0.2.4-0
./opt/brother/scanner/brscan-skey/brscan-skey
./opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0.cfg
./opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0
./opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-1.sh
./opt/brother/scanner/brscan-skey/brscan_mailmessage.txt
./opt/brother/scanner/brscan-skey/brscan_mail.config
./opt/brother/scanner/brscan4
./opt/brother/scanner/brscan4/doc/brscan4
./etc/opt/brother/scanner/brscan-skey
./etc/opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0.cfg
./etc/opt/brother/scanner/brscan-skey/brscan_mailmessage.txt
./etc/opt/brother/scanner/brscan-skey/brscan_mail.config
./etc/opt/brother/scanner/brscan4
./tmp/brscan_jpeg_PAGE1_6iCBgx
# 
# find . -name "*brother*" -print
find: ‘./run/user/1000/gvfs’: Permission denied
./usr/share/ppd/brother
./usr/share/ppd/brother/brother-DCPL2540DW-cups-en.ppd
./usr/share/app-install/desktop/balazarbrothers:balazarbrothers.desktop
./usr/share/cups/model/brother-DCPL2540DW-cups-en.ppd
./usr/share/doc/lsof/examples/big_brother.perl5.gz
./usr/lib64/sane/libsane-brother4.so.1.0.7
./usr/lib64/sane/libsane-brother4.so
./usr/lib64/sane/libsane-brother4.so.1
./usr/lib/cups/filter/brother_lpdwrapper_DCPL2540DW
./usr/lib/x86_64-linux-gnu/sane/libsane-brother4.so.1.0.7
./usr/lib/x86_64-linux-gnu/sane/libsane-brother4.so
./usr/lib/x86_64-linux-gnu/sane/libsane-brother4.so.1
./opt/brother
./opt/brother/Printers/DCPL2540DW/cupswrapper/brother_lpdwrapper_DCPL2540DW
./opt/brother/Printers/DCPL2540DW/cupswrapper/brother-DCPL2540DW-cups-en.ppd
./etc/opt/brother
#
 
Old 06-25-2017, 04:14 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,807

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
The article covers creating a scanner udev rule (for setting device permissions). Did you check that such a rule exists? If 'sane-find-scanner' detects a USB-connected scanner device as root but not as user that usually means that a suitable udev rule is missing.

It also mentioned some quirk regarding simple-scan (just in case it is relevant to your situation)...
Quote:
Note: some reports indicate that it might be necessary to run Simple Scan once (and only once) with root permissions, in order to have it recognize the scanning feature of your Brother MFC. So if Simple Scan can't use the scanning feature yet, execute this terminal command:

gksudo simple-scan

This launches Simple Scan with root permissions. Now it should recognize the Brother scanner. After the recognition, close Simple Scan and launch it again normally, i.e. without root permissions. It should work fine now.

Last edited by ferrari; 06-25-2017 at 10:33 PM.
 
Old 06-25-2017, 06:48 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Original Poster
Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Thanks again.

I did run Simple Scan as a normal user initally (it didn't work), then as root (it worked), and then again as a normal user (it still didn't work). That was before I posted my initial question.

I did not check the udev rule after seeing the article above that part was off-base with my installation. But you're right in your implication - it's really two separate things - (1) Brother driver locations and (2) udev rules. I'll go check udev later this evening and see what's there, adding what the article suggests if it's missing. I'm not a udev expert to be able to understand exactly what that rule is doing, but I can still cluelessly mimic what they show in the article and see if it works.

Thanks!
 
Old 06-25-2017, 10:51 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,807

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
It used to be that a rule similar to below was required to set the permissions and group in a custom local rule eg /etc/udev/rules.d/40-brother.rules
Code:
# Brother
ATTRS{idVendor}=="04f9", MODE="0660", GROUP="lp", ENV{libsane_matched}="yes"
but now it seems that Ubuntu/Mint users generally just edit the existing rules in /lib/udev/rules.d/40-libsane.rules with the following
Code:
# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
I'm not running Ubuntu/Mint so can't inspect the rules, but it may be that there is a common section within that udev rules file that sets the device node permissions and group for all scanner devices matched in that file.

Hope that makes sense.

Last edited by ferrari; 06-25-2017 at 10:59 PM.
 
Old 06-25-2017, 11:06 PM   #7
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Original Poster
Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
SOLVED: Need help: Getting Brother printer/scanner to work in LinuxMint

Thank you @ferrari!!! Adding the udev rule worked.

=======

Summarizing the fix for anyone in the same situation that stumbles upon this thread:

Environment:

LinuxMint 18.1 x64 XFCE
Brother DCP-L2540DW printer/scanner connected via USB

Steps:

(1) Go to http://support.brother.com, click "Downloads, then "Search by Model Name" (enter your printer/scanner model). Click "Linux", then "Linux (deb)", then "Search". Then click "Driver Install Tool". Agree to the EULA and download the tool. Unzip the download and run the tool as "root". When the tool asks you if you will be specifying the URI, answer "no" if printer is USB connected, "yes" if network connected.

(2) Add all userids that will need access to the scanner to the group "scanner".

(3) Add the following to /lib/udev/rules.d/*libsane.rules, right before the last line of the file:

ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"

(4) Reboot
 
Old 06-25-2017, 11:15 PM   #8
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,807

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Glad to have been of help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New Printer Scanner in Xsane finds new printer/scanner (Brother MFC-6520DW) with error message TrinityBeing Linux - Newbie 23 03-29-2016 10:27 AM
Easy install Brother MFC-665CW printer scanner etc. paynejp Linux - Hardware 1 11-07-2009 07:21 PM
Problem with Brother Printer/Scanner unihiekka Linux - Hardware 1 10-26-2005 12:13 PM
Brother DCP-110C Printer/Scanner Installation Issues Maxwell Rain Mandriva 4 08-08-2005 03:09 PM
Brother Printer/Scanner DCP-110C Installation Issues Maxwell Rain Linux - Hardware 1 10-31-2004 05:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration