Skip to content

Instantly share code, notes, and snippets.

@AndiH
Created April 30, 2019 06:55
Show Gist options
  • Save AndiH/d4e597aedb2a31d2501a626db504fe11 to your computer and use it in GitHub Desktop.
Save AndiH/d4e597aedb2a31d2501a626db504fe11 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
_SYSTEMNAME=$(cat /etc/FZJ/systemname)
USERSHELL=/bin/zsh
case $_SYSTEMNAME in
juron)
export SYSTEMNAME="JURON"
;;
juwels)
export SYSTEMNAME="JUWELS"
;;
jureca)
export SYSTEMNAME="JURECA"
;;
*)
echo "System not yet configured for use with zsh"
;;
esac
if [[ $SYSTEMNAME = JURECA ]]; then
export PATH=$HOME/shared/software/bin/:$PATH
USERSHELL=`which zsh`
fi
if [ -z "$LOADLBATCH" -a -e "${USERSHELL}" ]; then
if [[ -n $SYSTEMNAME ]]; then
if [ "$XDM" = "" -a "$KDE_FULL_SESSION" = "" -a "$DTUSERSESSION" = "" ]; then
# ssh or telnet
SHELL=$USERSHELL ; exec $USERSHELL -l
else
# XDM, KDE or CDE
SHELL=$USERSHELL ; exec $USERSHELL -l &
fi
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment