trustcrypto / OnlyKey-Firmware

The OnlyKey Firmware runs on the OnlyKey itself and provides the core functionality of OnlyKey.
https://docs.crp.to/firmware.html
212 stars 40 forks source link

Update udev rules to include GROUP #152

Open TheOnAndOnlyZenomat opened 1 year ago

TheOnAndOnlyZenomat commented 1 year ago

I don't know if this is the right place, but the PKGBUILD from the onlykey-udev AUR package, pointed to a rawgithubuserconent link under the trustcrypto user, under which I couldn't find a repo containing those rules, so I am opening this issue here.

With some commands, like onlykey-gpg init or onlykey-agent -c you get an error like this:

2022-09-14 14:15:37,533 ERROR        failed to connect                                                                                    [client.py:279]
Traceback (most recent call last):
  File "/home/zeno/.local/lib/python3.10/site-packages/onlykey/client.py", line 270, in _connect
    self._hid.open_path(self.path)
  File "hid.pyx", line 142, in hid.device.open_path
OSError: open failed
2022-09-14 14:15:39,135 ERROR        failed to connect                        

In my case this was caused, because the udev rules didn't specify a group. After I updated them to this:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", GROUP="plugdev", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", GROUP="plugdev", MODE:="0666"

it worked.

bryanpedini commented 1 year ago

a rawgithubuserconent link under the trustcrypto user, under which I couldn't find a repo containing those rules

probably a gist then

TheOnAndOnlyZenomat commented 1 year ago

I know I could put them in a gist, but because the linked gist is the main source for the udev file, I want the updated information in that gist, and not one I open myself

onlykey commented 1 year ago

We have a link to the UDEV rule here - https://docs.onlykey.io/linux.html

I think that is the same link used by the AUR. The AUR was not made by us but by an OnlyKey user contributor.

TheOnAndOnlyZenomat commented 1 year ago

It is the link used in the AUR, but I thought, that you were in control of gist. And even if not, it would make sense to update the link in the docs to a new gist, or even a file in a repo, which can be easier updated, than a gist, containing the changes. But maybe I am just missing something here, so sorry, if I am talking stupid stuff :D