First time here? Check out the FAQ!
answered 2020-12-21 10:10:43 -0600
In Linux you should be able to check the display availability by retrieving the environment variable DISPLAY
#if __linux__ has_display = !(std::getenv("DISPLAY") == nullptr); #endif