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

JD Rogers rogersjd at gmail.com
Sun May 6 17:09:35 MST 2012


On Sun, May 6, 2012 at 6:23 PM, Jim March <1.jim.march at gmail.com> wrote:
> JD, yeah, I think I can riff off of that well enough :).  Lemme be clear
> though: the parts I need to tweak are "04b9" and "8000", right?  (And if so,
> yeah, I know how to decipher that.)  Other than that, use your code?

Yep. those are the ones. You could also call the file something better
like 60-scanner.rules.

HTH,
JDR

>
> Thanks!
>
> Jim
>
>
> On Sun, May 6, 2012 at 4:15 PM, JD Rogers <rogersjd at gmail.com> wrote:
>>
>> I second Ian's suggestion. I had to do something similar for accessing
>> a usb license dongle from within qemu.
>>
>> There are howto's out there, but I created a group called "usbusers",
>> added the user to the group, created a file:
>> /etc/udev/rules.d/60-zemaxkey.rules
>> SUBSYSTEM!="usb_device", ACTION!="add", GOTO="key_rules_end"
>> # Zemax Key
>> SYSFS{idVendor}=="04b9", SYSFS{idProduct}=="8000", GROUP="usbusers",
>> MODE="0660"
>> LABEL="key_rules_end"
>>
>> Obviously, you need to change the idVendor and product number to match
>> the printer or scanner. I forget if there are any other steps, but
>> that along with some googling ought to get you there.
>>
>> On Sun, May 6, 2012 at 5:52 PM, Ian McEwen
>> <ianmcorvidae at ianmcorvidae.net> wrote:
>> > 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/
>> >
>> > _______________________________________________
>> > Tucson Free Unix Group - tfug at tfug.org
>> > Subscription Options:
>> > http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>> >
>>
>> _______________________________________________
>> Tucson Free Unix Group - tfug at tfug.org
>> Subscription Options:
>> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>
>
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>




More information about the tfug mailing list