Izurii / Lenovo-Y720-KB-Led-Controller

Controller for the backlight of the Lenovo Legion Y720 keyboard.
GNU General Public License v3.0
50 stars 13 forks source link

Automatic /dev/hidraw0 access #37

Closed mmalisz closed 2 years ago

mmalisz commented 2 years ago

Skip asking for the root access each time the laptops has been rebooted.

Izurii commented 2 years ago

Thanks for the pull request. I'll be taking a look as soon as possible.

Izurii commented 2 years ago

The only thing I don't like at this udev rule is that is giving access to all hidraw devices to group plugdev, I think we should be more specific about the device we want to have permissions.

So something along those lines I think is better, as we specificy more the udev rule we can just put mode 0666 and all users have permissions write/read to the device, this way we don't need to add the user to a specific group:

SUBSYSTEM=="hidraw", ATTRS{name}=="ITE33D1:00", MODE="0666"

What do you think about that?

mmalisz commented 2 years ago

Limiting to a specific ID seems a good idea.

As for the chmod, I am fine with it, one less step ;-)

Izurii commented 2 years ago

Can you test what I said and if it works, update your README and commit it, then I'll proceed to merge the PR. Many thanks