This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Cannot find the D-Bus session server

Tags: None
(comma "," separated)
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
Hello.

First of all, I use KDE 4.1.2 on PC-BSD and I have problems KDE using D-BUS.

I have a remote calendar added into KOrganizer via HTTPS, so it has to use and remember certificates (I've always said "Forever" for that). At some point KOrganizer started asking me to verify certificates every time it refreshed the calendar, although I still say it to remember the answer "Forever".

I downloaded the root-certificate and noticed, that I can open it with Kleopatra, but the latter didn't open. When I try to open it from terminal, I get:
Code: Select all
kleopatra(23864): KUniqueApplication: Cannot find the D-Bus session server

kleopatra(23854): KUniqueApplication: Pipe closed unexpectedly.


I see that the following dbus processes are running:
Code: Select all
$ ps ax -U silver|grep dbu
23381  ??  I      0:00.00 dbus-launch --autolaunch ada2d16e5e24b1c93820481b48c31b56 --binary-syntax --close-stderr
23382  ??  Is     0:00.01 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
23393  ??  I      0:00.00 dbus-launch --sh-syntax --exit-with-session
23394  ??  Is     0:01.03 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session


I tried removing everything related to KDE from /tmp/ and /var/tmp/, but it didn't change anything. Can anyone guide me to what could be wrong with D-BUS?
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
Today I get a new message from Kleopatra :)
Code: Select all
$ /usr/local/kde4/bin/kleopatra
kleopatra(41706) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1.
kleopatra(41705): Communication problem with  "kleopatra" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken." "


Still no clues?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
All KDE 4 Applications use DBus, and they are clearly not affected. I have also noticed on my installation that "Forever" = Till the end of this session.

I do not know why your Kleopatra will not open, however just to eliminate your user profile, could you try it under another fresh user?

If the user is affected, ensure that your KDE is fully updated, and then if it still doesn't work, file a bug with your distribution ( Kleopatra opens for me )

If the user is not affected, you will need to check your user profile, which could start with removing your kleopatra configuration. in ~/.kde4/share/config remove these files:
kleopatracertificateselectiondialogrc
kleopatrarc
libkleopatrarc


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
I don't think it's actually Kleopatra's fault. I guess remembering certificates is somehow related to D-Bus too and as it doesn't work properly, remembering (storing certificates somewhere through D-Bus or smth) fails.
BTW, in the past this "remember forever" really worked as "forever" (ie. I didn't get the prompt after KDE restart etc), but now certificates aren't remembered at all (even not until the end of a session), but it's prompted every time the check on server is done.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I did have that problem ( always coming up even after forever ). Try "Current sessions only" in that case ( should allow it to work until the application is closed ).
I cannot think of a reason why Kleopatra won't open for you. It uses UNIX sockets to communicate with GnuPG, which is responsible for Keys. Do not know about Certificates.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
Nope, it doesn't matter what I choose, I still get the prompt on reloading the calendar. Actually that Kleopatra doesn't matter - it was just something I hoped to import my root-certificate into KDE security system with, so that maybe that would help. How is it done? :)

Last edited by atrox on Tue Nov 04, 2008 7:14 am, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
While you cannot do it through Kontact itself ( or even KMail ) since you are supposed to use Kleopatra.

I wrote a command line script to do this easily for you. Open Konsole, and run these commands:
wget http://sourtooth.googlepages.com/add-cert.sh
chmod +x ./add-cert.sh
./add-cert.sh

If you want to store a copy of the SSL certificate you will find it in /tmp/ca-cert.pem after running the above script.

After that you should have no problem. I still do not know why Kleopatra refuses to work for you though.

Last edited by bcooksley on Tue Nov 04, 2008 8:20 am, edited 1 time in total.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
At first I didn't have gpgsm command, so I recompiled gnupg with SM support. Importing the root-certificate changed nothing and nor did importing my HTTP-server's certificate (with your script).
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Since it is a HTTPS Url, maybe it falls in Konqueror's area of control. In Konqueror > Settings > Configure Konqueror > Web Browsing > Crypto. Check the SSL Signers tab, and try importing your CA Certificate there.

Do you have a 'gpg-agent' running on your computer? ( pidof gpg-agent in Konsole should list some numbers )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
I don't have gpg-agent running - should I?

When trying to import certificate in Konqueror I get (in konsole):
Code: Select all
$ /usr/local/kde4/bin/konqueror
konqueror(61386) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1.
findServiceByDesktopPath: kcmdolphin not found
findServiceByDesktopPath: ...
findServiceByDesktopPath: khtml_plugins not found
QStringList Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(const Solid::DeviceInterface::Type&)  error:  "org.freedesktop.DBus.Error.Disconnected"

QStringList Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(const Solid::DeviceInterface::Type&)  error:  "org.freedesktop.DBus.Error.Disconnected"

QStringList Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(const Solid::DeviceInterface::Type&)  error:  "org.freedesktop.DBus.Error.Disconnected"

QStringList Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(const Solid::DeviceInterface::Type&)  error:  "org.freedesktop.DBus.Error.Disconnected"

QStringList Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(const Solid::DeviceInterface::Type&)  error:  "org.freedesktop.DBus.Error.Disconnected"

QStringList Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(const Solid::DeviceInterface::Type&)  error:  "org.freedesktop.DBus.Error.Disconnected"


And after closing Konqueror, a message is thrown into Konsole after a while:
Code: Select all
kleopatra(61544): Communication problem with  "kleopatra" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken." "
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I have it running. Perhaps that is the reason why Kleopatra does not want to open for you, as I do know it uses gpg-agent ( communicating via sockets found in ~/.gnupg/ ). However having it running does not appear to affect KDE 4 applications anyway.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
I started gpg-agent, but it put its socket in /tmp:
Code: Select all
$ gpg-agent --daemon
GPG_AGENT_INFO=/tmp/gpg-rRKFYL/S.gpg-agent:14616:1; export GPG_AGENT_INFO;


And it didn't change Kleopatra's behaviour in any way :(
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Some distributions / operating systems may decide to do things slightly differently. Have you tried running Kleopatra under another user, as the only thing I can think of is that something in your user profile is messed up.

Failing that you may want to ensure that Kleopatra is fully updated. Finally, I would try asking whoever is responsible for the KDE BSD port, whether any special steps need to be taken with a installation, before it can be used. You will probably have to talk with this person on the mailing lists.

Even if you do get Kleopatra working, because of the bugs I listed here, it won't work anyway. you can read more details at my post there.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS
I'm just wondering that does all the certificate-stuff in KDE4 go through Kleopatra indeed? If not, then we should not concentrate on Kleopatra at all (as it's just another symptom), but rather on D-BUS as Konqueror failed to communicate with it too.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I think Kleopatra is just a Frontend to the backend system which KDE is supposed to use. Because of those bugs I previously mentioned, in particular bug 162485, trusting a certificate yourself does not work.

I do not know why Kleopatra is failing to work, however ensure that no other Kleopatra's are running in the background ( killall kleopatra ). I re-read this thread and saw a 1 pid difference in your second post ( only 1 instance of kleopatra is permitted at one time, the second is passing along your request it recieved to the first so it is carried out )

With regards to the Konqueror D-Bus issues, that is it failing to communicate with HAL, because it is getting disconnected by the looks of it. It is a completely unrelated issue to this one, your D-Bus is fine ( otherwise KDE 4 would be totally non functional and probably would not load ).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]