From 2e61a0520e773c8d74497396ac8ff914f5324763 Mon Sep 17 00:00:00 2001 From: "Casper Ti. Vector" Date: Fri, 9 Nov 2012 21:31:44 +0800 Subject: [PATCH] profile.sh: revert 97afbbf0 for reasons given in comments. --- src/profile.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/profile.sh b/src/profile.sh index dd7716a..3dbdeac 100644 --- a/src/profile.sh +++ b/src/profile.sh @@ -1,5 +1,8 @@ -if [[ "$(tty)" == '/dev/tty'* ]]; then +# To avoid potential situation where cdm(1) crashes on every TTY, here we +# default to execute cdm(1) on tty1 only, and leave other TTYs untouched. +if [[ "$(tty)" == '/dev/tty1' ]]; then [[ -n "$CDM_SPAWN" ]] && return - [[ -z "$DISPLAY$SSH_TTY" ]] && exec cdm + # Avoid executing cdm(1) when X11 has already been started. + [[ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ]] && exec cdm fi