I have seen several suggestions about programs to change the resolution from the command line. However I just want to display it, not change it.

On linux I can use xrandr or xdpyinfo to get this info, so I am looking for something like that.

I also need it to work within a cygwin shell.

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

Try this:

wmic desktopmonitor get screenheight, screenwidth

From within Cygwin:

cmd /c wmic desktopmonitor get screenheight, screenwidth

I'm not sure what tricks to use in order to use the output. Perhaps a temporary text file?

link|improve this answer
Yes thanks it works from cmd.exe. However I forgot to mention that I need this to work inside a cygwin shell and wmic do not seem to work there. – Zitrax Apr 15 '11 at 9:30
1  
@Zitrax: Now you tell me. – paradroid Apr 15 '11 at 9:52
Thanks again. It did not work when connecting with rdesktop (or ssh into cygwin) though. Would be great to have it in all those situations also. – Zitrax Apr 15 '11 at 20:16
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.