The Geometry of X11



next up previous contents index
Next: Personalizing X Windows Up: LOOKING THROUGH X Previous: Standard X11 Options

The Geometry of X11

 
Figure: X11 screen coordinates.
Click on figure to view larger image. 

Before we begin personalizing X, let's orient ourselves to the geometry of the X display. Consider Figure 4.6. The upper left corner of the screen is the origin (x,y)=(0,0). The x coordinate increases from left to right while the y coordinate increases from top to bottom. To place a window in a particular location, we give the window size and coordinates as widthxheight+x+y. A negative coordinate means the coordinate is referenced from the corner opposite the origin. So +0+0 is the upper left corner and -0-0 is the lower right corner. To place an 80 column by 40 row xterm window at the top of the screen and 100 pixels from the left, you issue the Unix command: 

% xterm -geometry 80x40+100+0   	Top left (slightly right).    

To place a 100 X 100 size xclock at the top of the screen and over 200 pixels from the right of the screen, you issue the Unix command:

% xclock -geometry 100x100-200+0   	Top right (slightly left).   



next up previous contents index
Next: Personalizing X Windows Up: LOOKING THROUGH X Previous: Standard X11 Options