HenrikBengtsson / brother-ptouch-label-printer-on-linux

How to print to a Brother P-touch (PT) label printer on Linux
MIT License
128 stars 11 forks source link

Use udev rules instead of sudo and SUID. #12

Closed pdecat closed 6 months ago

pdecat commented 6 months ago

This PR updates instructions to use the udev rules that were recently added to the project: https://git.familie-radermacher.ch/linux/ptouch-print.git/commit/?id=a51fcf98f879b2505ea002d9b7385ba143c2febc

Note: using SUID on a non secured executable file is dangerous.

HenrikBengtsson commented 6 months ago

Thank you. This is great. TIL about udev.

FWIW, I had to reboot the machine for the new udev rules to take place. For some reason sudo udevadm control --reload wasn't sufficient.

pdecat commented 6 months ago

FWIW, I had to reboot the machine for the new udev rules to take place. For some reason sudo udevadm control --reload wasn't sufficient.

You may have to unplug then re-plug the USB device for the rules to be taken into account. Executing sudo udevadm trigger may also do the job.