Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X/Gnome: How to measure the geometry of an open window

Tags:

linux

x11

gnome

Is there a standard X / Gnome program that will display the X,Y width and depth in pixels of a window that I select? Something similar to the way an xterm shows you the width and depth of the window (in lines) as you resize it.

I'm running on Red Hat Enterprise Linux 4.4.

Thanks!

like image 751
JohnnyLambada Avatar asked Sep 16 '08 14:09

JohnnyLambada


2 Answers

Yes, you're looking for the program 'xwininfo'. Run it in another terminal and then click on the window you want info about and it will give it to you.

Hope this helps!

like image 113
Frank Wiles Avatar answered Oct 23 '22 18:10

Frank Wiles


$ xwininfo 

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x1200007 "xeyes"

  Absolute upper-left X:  1130
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 150
  Height: 100
  Depth: 24
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +1130+0  -0+0  -0-924  +1130-924
  -geometry 150x100-0+0
like image 26
Linulin Avatar answered Oct 23 '22 17:10

Linulin