From 4d90d703d054b846c1cafe0fbf642763035208b5 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sat, 18 Oct 2014 15:08:20 +0400 Subject: [PATCH] X-alias updated. --- alias.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alias.sh b/alias.sh index 5b333f2..df5931e 100755 --- a/alias.sh +++ b/alias.sh @@ -31,7 +31,8 @@ alias du='du --human-readable --total' alias nohup='nohup > /dev/null $1' alias k='killall' which sudo &>/dev/null && alias sk='sudo killall' -alias x="exec sh -c \"(/usr/bin/nohup xinit -- -nolisten tcp vt`fgconsole 2>/dev/null` &>/dev/null)&\"" +FGCONSOLE=`fgconsole 2>/dev/null` +[ ! -z $FGCONSOLE ] && alias x="exec nohup xinit -- -nolisten tcp vt$FGCONSOLE &>/dev/null" # autofixing alias cd..='cd ..'