From 7ebaa1ffb3ddae7c1218ecfdbff09edbe7a1ee75 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 9 May 2016 13:30:40 -0400 Subject: [PATCH] make init fail if a dbus session connection cannot be created typically this indicates a broken session manager or someone trying to run a wayland session without using dbus-launch --- src/bin/e_main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/bin/e_main.c b/src/bin/e_main.c index ef68ab509..28ed4bc69 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -629,7 +629,17 @@ main(int argc, char **argv) if (e_config->show_splash) e_init_status_set(_("Setup Message Bus")); TS("E_Msgbus Init"); - if (e_msgbus_init()) + if (!e_msgbus_init()) + { + if (!getenv("E_NO_DBUS_SESSION")) + { + e_error_message_show(_("Enlightenment cannot create a dbus session connection.\n" + "At best this will break many things, at worst it will hard lock your machine.\n" + "If you're sure you know what you're doing, export E_NO_DBUS_SESSION=1")); + _e_main_shutdown(-1); + } + } + else _e_main_shutdown_push(e_msgbus_shutdown); TS("E_Msgbus Init Done");