I want to create a keybinding Ctrl+Alt+Delete on my Ubuntu PC. It should open htop, but I want maximum priority for it. I use this command.
xterm -fullscreen -fa 'Monospace' -fs 13 -e htop
It works well, but when I add priority, it needs root permissions
$ nice -n -20 xterm -fullscreen -fa 'Monospace' -fs 13 -e htop
nice: cannot set niceness: Permission denied
When I use sudo, it works, but it runs the whole command as root. How can I run only nice with sudo? It would be ideal if it didn't ask for a password.
sudo nice ... sudo -u <some-user> xterm ...Procedure for skipping passwords remains the same – muru Aug 08 '17 at 12:08htopat a negative priority? I can’t think of a reason that couldn’t be achieved better through other means. – David Foerster Aug 14 '17 at 11:35