Category: script

How to find out the actual screen resolution from a shell script

When I have to personalize the settings of my FreeNX client, I have to know which resolution should I set in order to get a maximized window which perfectly fit my desktop. Once I get connected to my remote desktop and having its window resized, I get the new resolution with:

xdpyinfo  | grep dimensions
dimensions:    3200x1200 pixels (847x318 millimeters)

or

xrandr -q | grep current
Screen 0: minimum 8 x 8, current 3200 x 1200, maximum 8192 x 8192

WordPress Themes