Getting the screen resolution from the command line.

Rei Shinozuka shino at panix.com
Mon Mar 1 18:27:52 UTC 2010


the old-timer way is to run xdpyinfo:

~ $ xdpyinfo | grep dim
  dimensions:    3840x1080 pixels (1060x301 millimeters)


-rei


Ray Parrish wrote:
> Hello,
>
> 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.
>
> I haven't ran across the command line method for returning these values 
> before.
>
> Thanks for any help you can be.
>
> Later, Ray Parrish
>
>   




More information about the ubuntu-users mailing list