#-------------------------------------------------------------------
ME=`who -m PIPE awk '{print $2}'`
PORT=`who -u | grep $ME | awk '{print $8}' | sed 's/(//' | sed 's/)//'`
DISPLAY=$PORT:0.0
export DISPLAY
#-------------------------------------------------------------------
Q: How to check if DISPLAY variable is setup correctly?
Ans. The easiest way to test to check if DISPLAY is set correctly is to run /usr/openwin/bin/xclock command. If it shows a GUI clock, then your display variable is set correct.
No comments:
Post a Comment