Getting X display info easily

When editing my X display configuration, I sometimes want to know what resolution is actually being displayed, as compared to what I have set in xorg.conf. An easy command to do this:

1
xdpyinfo

. This command is designed to provide X display information, just what I want!

The most common things I need are resolution and DPI. Here are examples of these:

1
<br />$ xdpyinfo | grep resolution<br />resolution:    90x88 dots per inch<br />$ xdpyinfo | grep dimensions<br />dimensions:    3360x1050 pixels (948x303 millimeters)<br />

This tells me just what I need to see to confirm if what I am trying to set in the X config is manifesting or not.

Of course, if you want to do it the hard way, you can use the Pythagorean theorem, and divide the diagonal pixel resolution of your screen ( equal to the square root of the width squared plus the height squared) by diagonal size of your screen in inches… I’ll take the command.

Post to Twitter Post to Delicious Post to Digg Post to Reddit

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

This entry was posted in Desktop and tagged . Bookmark the permalink.

2 Responses to Getting X display info easily

  1. Duncan McGreggor says:

    Or you could just do it in one shot:

    $ xdpyinfo | egrep ‘resolution|dimensions’

  2. by Immortal Curiosity says:

    True ’nuff:-) I don’t usually need both at once though, so I split out the examples.

    Although, now that I am thinking of it, it might be handy to alias the combined form, as “displaystats” or something.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>