7
$\begingroup$

The command

SystemInformation["Devices", "ScreenInformation"]

returns the screen area in the monitors connected to its host computer:

{{"ScreenArea" -> {{65, 3200}, {24, 1080}}, 
  "FullScreenArea" -> {{0, 3200}, {0, 1080}}, 
  "BitDepth" -> 24, "Resolution" -> 96}}

However, if there are multiple monitors (e.g. in this case one 1920x1080 plus one 1280x1024) then this will only return the total area on my vanilla Ubuntu 14.04 box. It seems, however, that Windows 7 and MacOS 10.10.3 do provide a suitable list of rules for each monitor.

Is it possible to poll, in a platform-independent way, the dimensions of each individual monitor?

$\endgroup$
  • $\begingroup$ Can I ask what system you're running? $\endgroup$ – Emilio Pisanty May 26 '15 at 8:19
  • $\begingroup$ I am on a Macbook Pro running MacOS 10.10.3 and when I have an additional monitor (in addition to the notebook's display) connected via thunderbolt I get a list containing two entries like the one shown in your post above. Each entry corresponds to one monitor and seems to be correct. $\endgroup$ – Wizard May 26 '15 at 9:47
  • $\begingroup$ @Wizard and Kuba, thanks for the input. It seems it's either just a soup, or simply linux hardware support that's the issue, then. Or something. $\endgroup$ – Emilio Pisanty May 26 '15 at 10:01
  • 2
    $\begingroup$ This is a known issue on Linux. As a workaround, the system could be queried directly, e.g. xrandr -q | grep " connected ". $\endgroup$ – ilian May 26 '15 at 14:51
  • $\begingroup$ @ilian Is xrandr something I can assume a general user will have? (beyond the security risk of having an external command) $\endgroup$ – Emilio Pisanty May 26 '15 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.