UNIX Hints & Hacks

ContentsIndex

Chapter 7: Displays and Emulations

 

Previous ChapterNext Chapter

Sections in this Chapter:

   

7.1 Terminal Types

 

7.5 Testing ASCII Terminals

 

 

7.11 Control the Mouse with the Keyboard

7.2 Setting Terminal Types

 

7.6 Troubleshooting ASCII Terminals

 

7.9 Killing Resources with xkill

 

7.12 Display from a Remote X Server

7.3 Make Use of stty

 

7.7 Sharing STDIN/STDOUT on Two Terminals

 

7.10 Setting xterm Titlebars

 

7.13 ASCII Table in UNIX

7.4 Hotkeys

 

 

 

 

 

 

 

7.8 Refreshing X

7.8.1 Description

7.8.1 Description

There is a way to handle a screen when the graphics make things unreadable and confusing.

Example: Refresh X

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."

Reason

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.

Real World Experiences

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.

Other Resources

Man pages:

xrefresh, xterm

UNIX Hints & Hacks

ContentsIndex

Chapter 7: Displays and Emulations

 

Previous ChapterNext Chapter

Sections in this Chapter:

   

7.1 Terminal Types

 

7.5 Testing ASCII Terminals

 

 

7.11 Control the Mouse with the Keyboard

7.2 Setting Terminal Types

 

7.6 Troubleshooting ASCII Terminals

 

7.9 Killing Resources with xkill

 

7.12 Display from a Remote X Server

7.3 Make Use of stty

 

7.7 Sharing STDIN/STDOUT on Two Terminals

 

7.10 Setting xterm Titlebars

 

7.13 ASCII Table in UNIX

7.4 Hotkeys

 

 

 

 

 

 

 

© Copyright Macmillan USA. All rights reserved.