X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/465e06138e8baaefb967d32a2eaccf67daef8285..b26b1d491efe931ee3cf9fa9b6d647a0ec49c7da:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index ef2905d77..ff726401e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,7 +37,7 @@ #endif #include -extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) +int main(int argc, char **argv) { #ifndef Q_OS_WIN // Prohibit using sudo or kdesu (but allow using the root user directly) @@ -178,7 +178,12 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) mainWindow->show(); - KDBusService dolphinDBusService; + // Allow starting Dolphin on a system that is not running DBus: + KDBusService::StartupOptions serviceOptions = KDBusService::Multiple; + if (!QDBusConnection::sessionBus().isConnected()) { + serviceOptions |= KDBusService::NoExitOnFailure; + } + KDBusService dolphinDBusService(serviceOptions); DBusInterface interface; if (!app.isSessionRestored()) {