Run command automatically as root after login

Posted by J V on Super User See other posts from Super User or by J V
Published on 2012-11-03T16:23:31Z Indexed on 2012/11/03 17:07 UTC
Read the original article Hit count: 166

Filed under:
|

I'm using evrouter to simulate keypresses from my mouses extra buttons. It works great but I need to run the command with sudo to make it work so I can't just use my DE to handle autostart.

I considered init.d but from what I've heard this only works for different stages of boot, and I need this to run as root after login.

$ cat .evrouterrc 
"Logitech G500" "/dev/input/event4" any key/277 "XKey/0"
"Logitech G500" "/dev/input/event4" any key/280 "XKey/9"
"Logitech G500" "/dev/input/event4" any key/281 "XKey/8"
$ sudo evrouter /dev/input/event4

© Super User or respective owner

Related posts about login

Related posts about root