Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upkeyboard library requires root on GNU/Linux #35
Comments
|
This is the MIA Japanese Addon repo and not the right place to report issues with the MIA Dictionary addon. Anyhow, you could try this:
def ensure_root():
- if os.geteuid() != 0:
- raise ImportError('You must be root to use this library on linux.')
+ pass |
|
It looks like it actually was user Input (the group that owns /dev/input/*) that my user needed to be added to (though it's possible it could be both). I commented out the check for root, and it came up for a permission denied on /dev/input/event5. I added that group as well and that at least cleared the "Permission Denied" error, but it looks like there's a new error that we've run into where it is unable to map the 'C' key:
It looks like that's still an MIA Dictionary issue though, but I am not sure where to find that repo - is that elsewhere other than on github? I'd be happy to open up an issue on wherever that is hosted if it's not relevant here. Thanks! |
|
No longer should require root. |
Type:
Environment:
I'm going to open a PR to resolve the issue:
Description:
It looks like the keyboard library requires root on GNU/Linux, when calling keyboard.add_hotkey from Clipthread.run(), it fails when checking for root. I'm not sure how things work inside of Anki, but prior to initializing it looks like there needs to be some sort of request for root in order to use the keyboard library (From the boppreh/keyboard readme: Works with Windows and Linux (requires sudo))