X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.profile.d%2Fvariables.bashrc;h=a4fda1eff163b516d09171a87285b8a41bba1410;hb=8a304871323fd8c0ab81b81a9082f07d03a1fa0c;hp=8fa34ab00ddde97d8dcfce4b0523be120e4aab2e;hpb=d971afe79263574329b54a4e63ab1d996d24ce9f;p=profile.git diff --git a/.profile.d/variables.bashrc b/.profile.d/variables.bashrc index 8fa34ab..a4fda1e 100644 --- a/.profile.d/variables.bashrc +++ b/.profile.d/variables.bashrc @@ -1,4 +1,3 @@ -# $Id$ export SSHTERM=urxvtc export SSHTERM_TITLE=-title export SSHTERM_EXEC=-e @@ -25,5 +24,13 @@ elif [ $colours -gt 88 ]; then else export GREP_COLORS='cx=31:sl=:mt=33:fn=36:ln=34:bn=33:se=31' fi -export SCREENDIR="$HOME/.screen/$HOSTNAME" + +# Override SCREENDIR iff screen is not setuid. +screen=$(which screen &>/dev/null) +if [ ! -z "$screen" ]; then + if ! ls -l "$screen" | cut -d ' ' -f 1 | grep s >/dev/null; then + export SCREENDIR="$HOME/.screen/$HOSTNAME" + fi +fi +unset screen #mkdir -p "$SCREENDIR"