Getting the screen resolution from the command line.

Brian McKee brian.mckee at gmail.com
Mon Mar 1 18:33:07 UTC 2010


>> I need to know if there is a command line method of retrieving the
>> screen resolution for a computer that a bash script is running on. I
>> need it to center a bar graph in an HTML page.

> the old-timer way is to run xdpyinfo:
> ~ $ xdpyinfo | grep dim
>  dimensions:    3840x1080 pixels (1060x301 millimeters)

Which leads me to ask - two monitors? Your numbers look wider than mine....
  dimensions:    2720x1024 pixels (720x271 millimeters)

Brian

-- 
Hey, it's your computer.... isn't it?




More information about the ubuntu-users mailing list