[Tfug] Got a good one here: Paul's printer paradox

Jim March 1.jim.march at gmail.com
Sun May 6 15:15:57 MST 2012


I have a buddy name of Paul.  He has a new scanner/printer thing by
Brother, an MFC-9325CW.  I got all the drivers off of Brother's site - he's
running Mint 12 32bit (similar to Ubuntu Oneiric).

I have everything working, but there's a quirk in the scanner (USB
connected, where the printer is wireless).  When I start xsane it throws a
permissions error.

The cure is to first, do an lsusb like so:

sharon at sharon-Compaq-Presario-
CQ50-Notebook-PC ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04f9:029f Brother Industries, Ltd
Bus 004 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser

THEN, based on the bus and device ID, I have to craft a chmod command - in
the above case, like so:

sudo chmod a+w /dev/bus/usb/004/002

I can then start up xsane and it works great.

BUT, I get different USB bus and device IDs at every boot, so...this isn't
a persistent solution.

Right now I have an ugly hack in there: in their taskbar icon for xsane I
added "gksudo" first, to run xsane as root.  This too works, so long as you
agree to xsane's severe warning against the practice.

What I need is a quick script that runs lsusb, queries the bus and device
IDs for the line with "Brother" in it, and then spits that out into a chmod
command and then runs xsane.  Package that as a desktop icon and call it
good, right?

Or is there another persistent way to skin this cat?

If it was just for me, I'd say screw it and just run lsusb and chmod when I
want to scan (which for most folk isn't that often) but...they're not real
geeky...

Help?

I've BCCed Paul on this :).

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20120506/6595bbb8/attachment.html>


More information about the tfug mailing list