UNIX Hints & Hacks |
|||||||||||||||||||||||||||||||||||||
Chapter 7: Displays and Emulations |
|
||||||||||||||||||||||||||||||||||||
|
There is a way to handle a screen when the graphics make things unreadable and confusing.
Flavors: AT&T, BSD (Running X11R6)
Syntax:
xrefresh [-white] [-black] [-root] [-none] [-solid color]
There are times when spurious error messages, graphical lines, or windows can cause the X display to get messed up. There is a chance to clean the display with the command xrefresh, located in the X11R6 bin directory.
% /usr/lib/bin/X11/xrefresh
When xrefresh is executed it maps a fresh window on top of the desired area of the screen and then immediately unmaps it. This causes refresh events to be sent to all the running applications on the display. By default, a fresh window consisting of a window with no background is used and causes the applications to be repainted in the smoothest way possible. However, various options are available to make the background a specific color--black, white, and root or nothing.
% xrefresh -black
If you conclude that refresh will not clear the X display, you might have to kill the entire X session. See section 5.15, "Kill an Account," in Chapter 5, "Account Management."
When text or other forms of graphical images overlay the desktop, making it difficult to read what's on the desktop, refreshing X is sometimes the only option.
Window movement and the loss of a console window can cause your session to become confusing to the naked eye. On older versions of X and some that lack the memory required by an X session, when an X window is moved across the desktop it should refresh the background as the window is moved to its new location. In reality, it can leave a trail of lines and broken images of the window being moved.
There have also been cases when text from STDOUT is sent directly to the desktop. This can happen on older versions of X when the text of STDOUT is originally sent to the console window and the window is then closed. The text then sends the output to the console window that is beneath the X session. When this occurs you see text scrolling up through your desktop if there is a lot of data being sent to STDOUT. If not, refresh your X session and open a new graphic console window.
% /usr/X11/bin/xterm -C
To open a new X terminal window that receives console output, pass the -c option to the command. When open, STDOUT should be redirected to the window and off the desktop.
Man pages:
xrefresh, xterm
UNIX Hints & Hacks |
|||||||||||||||||||||||||||||||||||||
Chapter 7: Displays and Emulations |
|
||||||||||||||||||||||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.