In a server I want all user processes to have 25 as default priority.
My solution was to include the following config in /etc/profile
if [ $USER != "root" ]; then renice 5 -p $PID $$ fi
There are two problems with this solution:
if the user runs the command directly from ssh then the default priority is 20.
ssh firstname.lastname@example.org command.shcommand.sh runs with priority 20.
if the user uses another shell (zsh for example) default priority isn't being changed.
Any sugestions on how set the default priority for all shells (and for running ssh commands)?