Method to detect display modes (linux)