summaryrefslogtreecommitdiffstats
path: root/.zprofile
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-01-05 16:17:50 +0100
committerFlorian Pritz <bluewind@xinu.at>2013-01-05 16:17:50 +0100
commit3c86ec8c1a6f584fe3b6c5418d63f0a4ab946e73 (patch)
treedd1f0f2e01ea568963ce63a93e98c04a4f282ff2 /.zprofile
parenta78eb499922fd8e17270bbcdd5987af1fc746844 (diff)
downloaddotfiles-3c86ec8c1a6f584fe3b6c5418d63f0a4ab946e73.tar.gz
dotfiles-3c86ec8c1a6f584fe3b6c5418d63f0a4ab946e73.tar.xz
zprofile: check for $DISPLAY
kdm runs this file when logging into a graphical session and screen fails because it can't get a tty or something. Make sure this doesn't happen... Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.zprofile')
-rw-r--r--.zprofile2
1 files changed, 1 insertions, 1 deletions
diff --git a/.zprofile b/.zprofile
index fa8160b..e47e9ad 100644
--- a/.zprofile
+++ b/.zprofile
@@ -1,4 +1,4 @@
-if type screen &>/dev/null && [[ -e ~/.screenrc-2 ]]; then
+if [[ -z $DISPLAY ]] && type screen &>/dev/null && [[ -e ~/.screenrc-2 ]]; then
screenname=$(screen -list | grep "screen-sh-2")
if [ ! "$screenname" ]; then
exec screen -S "screen-sh-2" -c ~/.screenrc-2