diff options
Diffstat (limited to 'plugins/xsettings/main.c')
-rw-r--r-- | plugins/xsettings/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/xsettings/main.c b/plugins/xsettings/main.c index 65d9a203..bc15132a 100644 --- a/plugins/xsettings/main.c +++ b/plugins/xsettings/main.c @@ -3,6 +3,17 @@ #define STOP gsd_xsettings_manager_stop #define MANAGER GsdXSettingsManager #define GDK_BACKEND "x11" +#define MAIN_HOOK main_hook + +#include <glib.h> + +static void main_hook (void) +{ + /* Do not try to run if X11 is not available */ + if (g_getenv ("DISPLAY") == NULL) + exit (0); +} + #include "gsd-xsettings-manager.h" #include "daemon-skeleton-gtk.h" |