I found that to find the screen resolution, we do either

xdpyinfo  | grep 'dimensions:'


xrandr | grep '*'

But how do I find how much part of my screen resolution is covered by an application?

Like I want to determine how much resolution is covered by a GUI application on my monitor ?

Say, I want to determine how much resolution Firefox covers while maximized and while changing to my preferable dimension.

And also say, I want to determine the screen resolution covered by a website inside the web browser.


Run xwininfo in a terminal and click in the window you want information about. This will require the window to be visible, so you may need to use Alt-Tab or similar (anything that doesn't involve clicking with the mouse).

e.g. I just ran xwininfo and clicked in the Chromium browser window I'm typing this into:

$ xwininfo

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

xwininfo: Window id: 0x640001a "Find Screen resolution covered by an application - Unix & Linux Stack Exchange - Chromium"

  Absolute upper-left X:  627
  Absolute upper-left Y:  59
  Relative upper-left X:  4
  Relative upper-left Y:  24
  Width: 1603
  Height: 1342
  Depth: 24
  Visual: 0x21
  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:  +627+59  -1380+59  -1380-279  +627-279
  -geometry 1603x1342+623+35

BTW, xwininfo is mentioned in the "SEE ALSO" section of xdypinfo's man page. It always pays to read the documentation :)

From man xdpyinfo:


   X(7), xprop(1), xrdb(1), xwininfo(1), xrandr(1),
   xdriinfo(1), xvinfo(1), glxinfo(1)

xwininfo's man page also mentions xdpyinfo. They're both standard tools in x11-utils.

  • And how do I find the resolution covered by a website inside of the browser ? Aug 3 '17 at 12:00
  • 2
    @GypsyCosmonaut use the browser's DOM inspector, if it has one. Chromium does. Firefox does. Look in horrified fascination at the truly awful HTML and CSS lurking behind almost every web page you visit. Use the Stylish plugin to fix up the most annoying of the horrors.
    – cas
    Aug 3 '17 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.