3 of 5 added 30 characters in body

Thanks to @Ignacio Vazquez-Abrams and @Jeff Schaller (and other commenters below), I realized that $DISPLAY was the enviormental variable I needed. If you are in a display server the value held by $DISPLAY will be 0 will be returned (as something). Hence, the following code (should?) works--

if [[ -n $DISPLAY ]]
    PROMPT = (etc)
else 
    PROMPT = (etc2)
fi

Thanks to all.