Using Evolution under KDE – GNOME Keyring issues
Lets face it – Kontact is a nice application but its not really a contender if you want integration with your corporate address book and calendar in your PIM application1 and Evolution is the only solution for the feature set one would expect from a corporate friendly PIM solution.
Evolution works great when running under GNOME, but if you hate GNOME 3 as much as I do2, then you are likely to try to run Evolution under a recent KDE 4. And then problems start mounting – there’s the file dialogs which look completely different and don’t inter-operate with KDE’s virtual file system layer (KIO), but the most annoying problem is saving the passwords for your email, address book and calendar services.
Evolution relies on GNOME’s keyring service to store passwords for remote services, and that service is not running when you start KDE. Without the keyring, Evolution will keep asking you for passwords to all your email services when you start up, and for all your address book services when you try to compose an email. Which wouldn’t have been that bad if not for the fact that before popping up the password dialog, Evolution spends minutes (!!) trying to contact the GNOME keyring service. Only after being frozen for a couple of minutes you get asked for the first password, and if you have more then one service then please wait two more minutes while Evolution tries fruitlessly to contact GNOME keyring again!
The solution is simple – have GNOME keyring launch automatically when you log in to KDE, just like it does for GNOME. There are several ways to do this – for example using KDE’s “startup applications” system or writing custom profile scripts (I’ve tried both), but the more elegant solution I found in fedorahosted.org where someone committed a simple script that generates GNOME keyring startup and shutdown scripts for KDE. I’m guessing this is used in the KDE live CD spins for Fedora.
Anyway, this script can easily adapted to generate GNOME keyring integration scripts for your local KDE installation. Just start Konsole, and paste this into the command line:
cat > $HOME/.kde/env/start-custom.sh <<EOF
#!/bin/sh
eval \`gnome-keyring-daemon\`
export GNOME_KEYRING_PID
export GNOME_KEYRING_SOCKET
EOF
chmod 755 $HOME/.kde/env/start-custom.sh
cat > $HOME/.kde/shutdown/stop-custom.sh <<EOF
#/bin/sh
if [-n "\$GNOME_KEYRING_PID"]; then
kill \$GNOME_KEYRING_PID
fi
EOF
chmod 755 $HOME/.kde/shutdown/stop-custom.sh
Related articles
- GNOME vs. KDE: the Latest Round (tech.slashdot.org)
- GNOME 3 on Linux Mint 10 (martinwebster.eu)
- Fedora 15 beta released as GNOME 3 backlash grows (linuxfordevices.com)
- Are You Looking Forward to GNOME 3? (ostatic.com)
Hello,
thanks for the tip.
I have a bash error: (in french!)
“Erreur de syntaxe près du symbole inattendu « newline »”
at the very first command line
” cat > $HOME/.kde/env/start-custom.sh < "
any idea where it might come from?!
thanks
bash interprets the # as a comment marker, so it and everything after it is ignored. I think the suggested paste should look like this:
cat > $HOME/.kde/env/start-custom.sh < $HOME/.kde/shutdown/stop-custom.sh << EOF
#!/bin/sh
if [-n "$GNOME_KEYRING_PID"]; then
kill $GNOME_KEYRING_PID
fi
EOF
chmod 755 $HOME/.kde/shutdown/stop-custom.sh
Which works for me, creating two sane shell scripts in the appropriate locations.
That got garbaged when I posted it, interestingly. Something about this wordpress interface, I fear.
The important bit is ending the line with << EOF and the hash-bang line is the first line of the script, not part of the cat command.
You are right – I forgot to escape the input redirection and wordpress just ate my ‘<'s and the EOF after them because he thought its an HTML tag. I fixed noe.
Upon closer inspection, the shutdown script is broken, as the $GNOME_KEYRING_PID variable is interpreted when the cat runs rather than the literal string being inserted. I think escaping the dollar with a backslash is probably necessary to avoid that.
Thank you – I fixed the problem with the script now.
Hopefully this will be resolved by the freedesktop work on unifying keyrings APIs. But what do you find problematic with Kontact ? You can get your corporate address book just fine through LDAP. I didn’t needed calendaring but I suppose it works well, Akonadi seems to support both remote iCal and CalDAV.
2 main problems I have with Kontact: (a) I find it impossible to get it to do calendaring and addressbook sharing with my Zimbra server, and (b) its HTML editing is horrible and it doesn’t inter-op well with other HTML capable tools. Evolution’s HTML editing is not great either but it does the job well enough.