--- dosemu-1.0.2/etc/global.conf Tue May 14 15:25:38 2002 +++ dosemu-1.0.2/etc/global.conf.new Tue May 14 17:13:19 2002 @@ -232,33 +232,53 @@ # we have GNU sh-utils < 2.0 $xxx = shell("who am i") endif - if ( ($DOSEMU_STDIN_IS_CONSOLE eq "1") - || ( strlen($xxx) && (strchr($xxx, "(" ) < 0 ))) - $BEING_ON = "console" + + if ($DISPLAY ne "") + if (strchr($DOSEMU_OPTIONS,"X") >= 0) + $USING_X = (1) + $BEING_ON = "" + else + $BEING_ON = $BEING_ON, "_xterm" + endif else - if (strstr($xxx, "(:") < 0) - $BEING_ON = "remote" - $REMOTE_HOST = strsplit($xxx, strchr($xxx,"(")+1,99) - $REMOTE_HOST = strdel($REMOTE_HOST, strchr($REMOTE_HOST,")"),99) - else - $BEING_ON = "" - endif - if ( (strchr($DOSEMU_OPTIONS,"X") >=0) && ($DISPLAY ne "") ) - $USING_X = (1) - endif - if (strstr("xterm dtterm", $TERM) >= 0) - $BEING_ON = $BEING_ON, "_xterm" - else - if (strstr("linux console", $TERM) < 0) - # remote side must be some type of real terminal - $BEING_ON = $BEING_ON, "_terminal" - else - # remote side is a Linux console - $BEING_ON = $BEING_ON, "_console" - endif - endif + if ($DOSEMU_STDIN_IS_CONSOLE eq "1") + $BEING_ON = "console" + else + if (strstr("linux console", $TERM) < 0) + $BEING_ON = $BEING_ON, "_terminal" + else + $BEIGN_ON = $BEIGN_ON, "_console" + endif + endif endif +# if ( ($DOSEMU_STDIN_IS_CONSOLE eq "1") +# || ( strlen($xxx) && (strchr($xxx, "(" ) < 0 ))) +# $BEING_ON = "console" +# else +# if (strstr($xxx, "(:") < 0) +# $BEING_ON = "remote" +# $REMOTE_HOST = strsplit($xxx, strchr($xxx,"(")+1,99) +# $REMOTE_HOST = strdel($REMOTE_HOST, strchr($REMOTE_HOST,")"),99) +# else +# $BEING_ON = "" +# endif +# if ( (strchr($DOSEMU_OPTIONS,"X") >=0) && ($DISPLAY ne "") ) +# $USING_X = (1) +# endif +# if (strstr("xterm dtterm", $TERM) >= 0) +# $BEING_ON = $BEING_ON, "_xterm" +# else +# if (strstr("linux console", $TERM) < 0) +# # remote side must be some type of real terminal +# $BEING_ON = $BEING_ON, "_terminal" +# else +# # remote side is a Linux console +# $BEING_ON = $BEING_ON, "_console" +# endif +# endif +# endif + warn "dosemu running on ", $BEING_ON; $xxx = $_term_char_set