[Qt-interest] Test for X server support where application is running?

Ed Sutton edsutton at gmail.com
Wed Aug 19 19:28:05 CEST 2009


I want my application to not display the GUI window if for example, it
is running in an ssh shell.  Is there a way for an app to test if it
has X server support?

Objective:

1 - Test in main.cpp if have X server support
2 - If X server support, then run QApplication and open GUI window as normal.
3 - If not X server support, skip QApplication and run without opening
GUI window.

Thanks in advance,

-Ed



More information about the Qt-interest-old mailing list