udev rule for permissions & symlink for /dev/usb/lp0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm setting up a turnkey system that uses a Zebra brand USB barcode printer. I need to use it without CUPS, directly printing from an application. I've verified that this works when my application writes to /dev/usb/lp0. I've had to either run the application as root or change the permissions on /dev/usb/lp0. I though I could solve this problem by using a udev rule to recognize the printer, create a symlink, and set the permissions. I created the following rule in /etc/udev/rules.d/99-zebra.rules.

SUBSYSTEM=="usb", ACTION="" ATTRS{idVendor}=="0a5f", ATTRS{idProduct}=="011c", MODE="0666", SYMLINK+="zebra

This sort of works, but not in any useful way. It does recognize the printer, but instead of creating the symlink to /dev/usb/lp0 and changing the permission of that device file, it creates a symlink to e.g. /dev/bus/usb/001/002, and sets the permissions of that. However, I can't print to /dev/bus/usb/001/002 (or the symlink to that). Printing to /dev/usb/lp0 still works fine.

How do I write a udev rule that will set the permission of and symlink to /dev/usb/lp0 instead of the raw USB device?

Thanks!
Eric

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux