friedkeenan/GoldtreePy

Add udev rule information to the wiki

FennyFatal opened this issue · 4 comments

I am satisfied that this application is safe to run as root, but it is irksome to have to run an application with sudo when the only elevated requirement is that it be able to access a device in /dev/.

I propose doing something similar to what ADB does for android, and that is to fork off a server daemon (with a sudo request) that will listen for the goldleafpy client, and encapsulate the needed root permissions such that the client need not run as root.

Alternatively, it could be possible to simply chmod the device in /dev/, and integrate the sudo call into the script on first run.

You can accomplish this with a udev rule such as
SUBSYSTEM=="usb", ATTRS{idProduct}=="3000", ATTRS{idVendor}=="057e", MODE="0666"
Which will also work with most other homebrew USB stuff.

Personally, that seems much cleaner than what you're proposing, though I'm willing to hear an argument

Good idea. I think that would be a great thing to add to the wiki.

I'll add it when I merge the nightly branch (where the possibility of a udev rule is explicitly stated in the readme, but an example not shown), as I'd like to not make a wiki page only to redo the whole thing when Goldleaf v0.6 comes out.

Fixed with 741afc3