Can I restart the KDE Plasma Desktop without logging out?

I'm just talking about the standard KDE desktop. After a while (many days) of running the task bar stops working properly. This is due to some sort of undiagnosed bug but that's really not my boggle at the moment. It's fixed as soon as I log out and in again.

I have to close everything and ongoing processes like virtual machines have to shut down. It's a big pain. It typically means I put up with a bit of flickering for many days.

Is there a way to just reload the desktop without bombing all the running applications?


In KDE 4, you can do:

killall plasma-desktop #to stop it
kstart plasma-desktop #to restart it

In KDE 5 use:

killall plasmashell #to stop it
kstart plasmashell #to restart it

In KDE > 5.10 use:

kquitapp5 plasmashell
kstart5 plasmashell

Sometimes plasmashell is not responding so kquitapp5 fails after a timeout and you have to get back to killall. So in a nutshell, I would do :

# For KDE 4
killall plasma-desktop && kstart plasma-desktop

# For KDE 5 < 5.10
killall plasmashell && kstart plasma-desktop

# For KDE > 5.10
kquitapp5 plasmashell || killall plasmashell && kstart5 plasmashell

Remarks :

  1. If you are not sure which KDE version your run, kinfocenter --version will tell you.
  2. you can skip the kquitapp5 plasmashell || part if you don't want to be stuck in the timeout when plasmashell is not responding.

In KDE5 use "kstart plasmashell" to restart the plasmashell as a service instead of plasmashell &. If you use it that way it 's run as an independed service not connected to the current terminal session (meaning you can close the terminal without the process getting terminated). TLDR:

KDE5 (in Terminal):

killall plasmashell
kstart plasmashell

Well I didn't expect this to work (and it's not exactly what the question asks for) but pressing Alt+F2 and running:

kwin --replace

This reloads KDE's compositor and that seems to fix the flickering. I guess it's a factor into my particular issue.


The window manager kwin is responsible for moving around windows, etc. That can be restarted by this:

kstart kwin --replace

The kstart prefix is just to not run it as a subprocess in the current terminal, such that you can close the terminal afterwards.

plasmashell is responsible for the background and other shell things. Restarting that should work like this:

killall plasmashell
kstart plasmashell

Note that this did not bring back the menu for me.

Also, interestingly, this again breaks kwin for me, i.e. I'm not able to move windows around anymore. On console, I get sth like QXcbConnection: XCB error: 3 (BadWindow), sequence: ..., resource id: ..., major code: 15 (QueryTree), minor code: 0.