[Updated] KDE 4 Application Crashing
One hiccup I encountered when installing KDE 4 on my Gentoo laptop was that several applications would crash when started. When this happened, the KDE Crash Handler would pop up a window that said:
The application <app name> (<app name>) crashed and caused the signal 6 (SIGABRT).
It turns out that there’s an environment variable called $KDEDIRS, which is incorrectly set because I still have KDE 3.5.9 installed.
After some research on it, it turns out that KDE 3’s environment variable file /etc/env.d/45kdepaths-3.5 sets a value of $KDEDIRS which still gets used even when running KDE 4. This value is just fine for KDE 3.5, but it doesn’t work in KDE 4 due to some changes in how KDE determines application paths.
This seems to happen only when you have both KDE 3.5.9 (or earlier?) and slotted KDE 4.1.x using the “kdeprefix” USE flag. (Supposedly, KDE 3.5.10 has some ebuild modifications which work around this, but 3.5.10 isn’t stable yet, and I didn’t want to upgrade to a Testing version of KDE 3.5, nor did I want to spend an entire day compiling it before being able to really test if this worked.)
This leaves two options. First, upgrade your KDE 3.5.9 to 3.5.10 even though the latter still isn’t Stable. Or, second, put the following at the end of your ~/.bashrc:
if [[ "$DESKTOP_SESSION" != "KDE-3.5.9" ]]; then
export KDEDIRS="/usr:/usr/local"
fi
This works great for me!
UPDATE (Jan 30):
I found that the above workaround only solves the problem for applications launched from the Terminal window, but it doesn’t address applications launched from the panel or the menus. To solve it for both situations, do the following instead.
First, create a special KDE-4-only “env” folder:
mkdir ~/.kde4.1/env
Then create the following script and place it inside this folder:
#!/bin/sh export KDEDIRS=/usr:/usr/local
It looks like you can name the script whatever you want. I chose to name it “kde4-kdedirs.sh”.
Then log out of KDE 4 and log back in again. Things should be working now, from the menus, the panel, AND the Terminal window.
Related posts:
- Trying out KDE 4.1.4 Ever since the first public beta releases of KDE 4.0,...
- Upgrade to KDE 4.2 I upgraded to KDE 4.2 this evening. It’s definitely an...
- KDE 4.2, sets, and Portage 2.2 hard masked I ran my typical system update this morning, an emerge...
- Akonadi and MySQL I’ve had a little more shakedown time with KDE 4.2...