Restart KDE Plasma – How to Restart KDE Plasma Desktop Without Logging Out

kdekwin

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?

Best Answer

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.