Respond to and recover from screen messages by doing the following:
setsenv
The setsenv command displays the protected state environment when you logged in.
Determine if the DISPLAY variable has been set. In the following example, the DISPLAY variable does not appear, which indicates that the DISPLAY variable is not set to a specific value.
SYSENVIRON: NAME=casey TTY=/dev/pts/5 LOGNAME=casey LOGIN=casey
OR
DISPLAY=bastet:0 export DISPLAY
If not specifically set, the DISPLAY environment variable defaults to unix:0 (the console). The value of the variable is in the format name:number where name is the host name of a particular machine, and number is the X server number on the named system.
stty sane
The stty sane command restores the "sanity" of the terminal drivers. The command outputs an appropriate terminal resetting code from the /etc/termcap file (or /usr/share/lib/terminfo if available).
^J stty sane ^J
The ^J represents the Ctrl-J key sequence.