Run command automatically as root after login
- by J V
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