I would like to start a process with a nice value of -20. This requires me to use a command like -
sudo nice -n -20 matlab. However, this starts matlab as root too. Is there a way to have matlab as non-root?
My current approach is -
sudo nice -n -20 sudo -u myusername matlab - which, to me looks like a hack. Is there a direct approach to do this?