Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux raw input without root permission?

On a linux program, on the console (as in no xorg, etc), I'm using using /dev/input/event* to read keyboards and mice, however I need to be root to be able to read them. Is there an alternative form to read that stuff without needing root privileges (without having to change permisons and config files, etc)?

I understand why it does that by default no need to explain that.

like image 798
user1032861 Avatar asked Nov 04 '12 16:11

user1032861


1 Answers

yes, it's possible by creating a udev rule, see this HowTo

For example as root, create the file /etc/udev/rules.d/99-input.rules:

KERNEL=="event*", NAME="input/%k", MODE="660", GROUP="input"

Note: you will probably need to create the group "input" first.

like image 164
iabdalkader Avatar answered Oct 23 '22 13:10

iabdalkader