How to restart KDE Plasma only, not sddm

I know you can restart user interface using command

systemctl restart sddm

This command performs a complete log off and shuts down every open application.

But how can I restart KDE Plasma only, without closing every open application?

This is probably best to run from terminal to restart plasma:

kquitapp5 plasmashell && kstart5 plasmashell > /dev/null 2>&1

But if you are trying to make sure some changes are synced you might want to add something:

qdbus org.kde.KWin /KWin reconfigure; kquitapp5 plasmashell && kstart5 plasmashell > /dev/null 2>&1
6 Likes

Thank you.

The only problem is that this command does not work from tty consoles (the ones that you get with CTRL+ALT+F2 … 10 keys).

In order for those commands to really restart plasma, they have to be run in Konsole already opened from that plasma.

So either:

  • how do I open Konsole if Plazma is frozen?
  • why do those commands not work from tty? What must I change in order for them to work from tty?

I would suggest you to use htop -u <your user name> to find all processes that are running for that account.
Try to kill them all, which will make sddm auto-restart a login screen IIRC.
See this thread how to prevent the problem of “Frozen system” wrt Plasma hanging…

I know you were asking for KDE Plasma only, but sddm is the one who actually starts that…

1 Like

Try DISPLAY=:0 plasmashell --replace &, assuming that your session is on display 0. To find out your display number use the who command in the console tty. Haven’t ever tried that in combo with @cscs 's 2nd command with qdbus, you may experiment.

3 Likes