I'm on a multi user login-node, a front end node to a large national bioinformatics compute farm, running Linux. Many users misbehave by running computationally intensive jobs on the login-nodes. I don't. I'd like to be nice. In fact, I even would want my login shell to run at nice level 4 instead of the default 0 (zero).
What's the most convenient and non-contrived way of reniceing ones login shell?
My current setup:
I'm running ast-ksh (KornShell 93) within one or several
tmux sessions. The default shell on the system in
bash, but I
exec -l ksh93 from
~/.bash_profile and then I reattach to any running
tmux session from my
~/.profile, or create a new one if none exist.
~/.bash_profile: I don't want to touch
bash even with a stick, so all I'm willing to do with it is to have an
exec of my preferred shell. It's not easy to change one's default shell on this system...
if [ -f $HOME/sw/bin/ksh93 ]; then exec -l $HOME/sw/bin/ksh93 fi
~/.profile: I'm detecting whether I'm already in a
tmux session, and if I'm not, and I'm logged in over SSH, I attach to or spawn one.
if [[ -z $TMUX ]]; then ssh-add if [[ -n $SSH_TTY ]]; then if tmux has-session 2>/dev/null; then exec tmux attach-session else exec tmux fi fi fi
set -g default-shell "$HOME/sw/bin/ksh93"
Where in this would I renice
ksh93, and how?