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

Ian McEwen ianmcorvidae at ianmcorvidae.net
Sun May 6 15:52:22 MST 2012


I'd research udev; you can probably give the device a persistent
identifier and set permissions using a udev script. I've seen similar
things done for e.g. automounting USB without needing all the GNOME/KDE
cruft.

On Sun, May 06, 2012 at 03:15:57PM -0700, Jim March wrote:
> 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

> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org


--
Ian McEwen <ianmcorvidae at ianmcorvidae.net> <ihm08 at hampshire.edu>
A262 D5C4 40CB 0E1C 5F24 C3A1 ABED 1ABD 7131 A76F
http://ianmcorvidae.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20120506/29841b96/attachment.sig>


More information about the tfug mailing list