From kde-core-devel Wed Feb 13 23:30:56 2008 From: Ralf Habacker Date: Wed, 13 Feb 2008 23:30:56 +0000 To: kde-core-devel Subject: Re: KMaiL: Can't setup D-Bus service. Probably already running. Message-Id: <47B37DB0.5060504 () freenet ! de> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=120294845103454 Jarosław Staniek schrieb: > > Hello > I am getting > > (3852)/: KUniqueApplication: Can't setup D-Bus > service. Probably already running. > > in KUniqueApplication::start() when starting KMail on Windows another > time. > > QDBusConnectionInterface::registerService("org.kde.kmail") returns > DBUS_REQUEST_NAME_REPLY_EXISTS. > > I have no other kmail process started so I am wondering how to avoid > such cases in general for KUniqueApps. > I recognized a similar error with amarok starting the second time. I had to restart dbus-daemon to avoid this message. In that case i assume that the service KUniqueApplication registers in dbus wasn't unregistered at application shutdown. At least there is no unregisterService() call in whole kdelibs. May be that thiago can give some lights in this area. Anyway the related code is located in kdelibs/kdeui/kernel/kuniqueapplication.cpp line 146 bool KUniqueApplication::start() // Check to make sure that we're actually able to register with the D-Bus session // server. if (dbusService->registerService(appName) != QDBusConnectionInterface::ServiceRegistered) { kError() << "KUniqueApplication: Can't setup D-Bus service. Probably already running." << endl; ::exit(255); } Ralf