KMaiL: Can't setup D-Bus service. Probably already running.

Ralf Habacker ralf.habacker at freenet.de
Thu Feb 14 00:30:56 CET 2008


Jarosław Staniek schrieb:
>
> Hello
> I am getting
>
> <unknown program name>(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





More information about the Kde-windows mailing list