Every now and then, the Plasma desktop in KDE 4 crashes on me. Usually, it restarts itself. Sometimes, it doesn’t.
If you’re cursed with the latter scenario, there’s an easy solution.
Note: As avocadohead kindly mentioned in the comments, KDE >= 4.3 has renamed “plasma” to “plasma-desktop”. So if you’re using KDE 4.3 or later, replace “plasma” with “plasma-desktop” in the commands below.
By default, KDE sets the keyboard shortcut for “Run Command” to ALT+F2. So hit ALT+F2, and type this, and hit enter:
kbuildsycoca4 && kquitapp plasma && kstart plasma
Plasma should pop back to life.
That command is actually three commands:
- kbuildsycoca4 rebuilds KDE’s system configuration cache.
- kquitapp plasma ensures that Plasma’s no longer running, instead of just, say, hung.
- kstart plasma starts Plasma.
It took me a while to figure this out. Thanks to this post, I learned about kstart. From what I’ve read, it seems that running kquitapp plasma and kstart plasma from the CLI works for some people. Unfortunately, they fail for me on the CLI:
[nickh@chameleon ~] kquitapp plasma <unknown program name>(7282)/: "Application plasma could not be found using service org.kde.plasma and path /MainApplication." [nickh@chameleon ~] [nickh@chameleon ~] kstart plasma Qt: Session management error: Could not open network socket kstart(7394) main: Omitting both --window and --windowclass arguments is not recommended [nickh@chameleon ~] <unknown program name>(7397)/ checkComposite: Plasma has an argb visual 0x9ca7300 71303169 <unknown program name>(7397)/ checkComposite: Plasma can use COMPOSITE for effects on 0x9ca6c18 plasma(739: KUniqueApplication: Cannot find the D-Bus session server plasma(7397): KUniqueApplication: Pipe closed unexpectedly. [nickh@chameleon ~]