declare displayhost=${DISPLAY%:*} declare pingcmd case $OSTYPE in solaris*) pingcmd="ping $displayhost 1";; linux*) pingcmd="ping -c 1 $displayhost";; *) : ;; # TODO insert other flavors of ping here esac # If displayhost is blank DISPLAY is probably ":0" so we # shouldn't ping [[ -z "$displayhost" ]] && pingcmd="" if ! ( $pingcmd && xdpyinfo ) >/dev/null 2>&1; then # Either we can't ping the machine or xdpyinfo failed. # Either way, X is probably not going to work! unset _running_X fi
--
Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho
In reply to Re: X or console?
by greenFox
in thread X or console?
by batkins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |