Linux Commands Examples

A great documentation place for Linux commands


refresh all or part of an X screen

see also : X


xrefresh [-option ...]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


omxplayer "$@"
xrefresh -display :0
nautilus ~/.zip
xrefresh -white


Xrefresh is a simple X program that causes all or part of your screen to be repainted. This is useful when system messages have messed up your screen. Xrefresh maps a window on top of the desired area of the screen and then immediately unmaps it, causing refresh events to be sent to all applications. By default, a window with no background is used, causing all applications to repaint ’’smoothly.’’ However, the various options can be used to indicate that a solid background (of any color) or the root window background should be used instead.



Use a white background. The screen just appears to flash quickly, and then repaint.


Use a black background (in effect, turning off all of the electron guns to the tube). This can be somewhat disorienting as everything goes black for a moment.

-solid color

Use a solid background of the specified color. Try green.


Use the root window background.


This is the default. All of the windows simply repaint.

-geometry WxH+X+Y

Specifies the portion of the screen to be repainted; see X(7).

-display display

This argument allows you to specify the server and screen to refresh; see X(7).


DISPLAY - To get default host and display number.

x defaults

The xrefresh program uses the routine XGetDefault(3) to read defaults, so its resource names are all capitalized.
, White, Solid, None, Root

Determines what sort of window background to use.


Determines the area to refresh. Not very useful.


It should have just one default type for the background.

see also



Jim Gettys, Digital Equipment Corp., MIT Project Athena

How can this site be more helpful to YOU ?

give  feedback