The attached source checks via xrandr if an external display is connected (named VGA or DVI). It does not work with drivers that don't provide xrandr interface, e.g. the binary driver from nvidia.
The attached source checks via xrandr if an external display is connected (named VGA or DVI). It does not work with drivers that don't provide xrandr interface, e.g. the binary driver from nvidia.