Getting the screen resolution from the command line.

Rei Shinozuka shino at panix.com
Mon Mar 1 19:19:30 UTC 2010


yes, a pair of 24"  1920x1080 screens on an Asus EN9500GT/DI/1G.  lots 
of real-estate and easy config with 9.04, not a lot of $.

-rei


Brian McKee wrote:
>>> 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
>
>   




More information about the ubuntu-users mailing list