#! /bin/csh -f # Last edited on 1998-11-18 12:55:57 by stolfi # Tries to determine the correct value for the $DISPLAY variable # If $DISPLAY is undefined or invalid, tries to get it from the # file ~/.DISPLAY that is created by ~/PUB/lib/setdisp.csh if ( ! $?DISPLAY ) then set old = 'undefined' else set old = "${DISPLAY}" endif set new = "${old}" if ( ( "x${new}" == "x.0" ) || ( "x${new}" == "x" ) || ( "x${new}" == "undefined" ) ) then if ( -r ${STOLFIHOME}/.DISPLAY ) then set new = "`cat ${STOLFIHOME}/.DISPLAY`" endif endif if ( ( "x${new}" == "x.0" ) || ( "x${new}" == "x" ) || ( "x${new}" == "undefined" ) ) then set new = ":0.0" endif /bin/echo -n "${new}"