Restarting plasmashell or kwin automatically

Is there currently a user-friendly way to restart plasmashell or kwin?

From the CLI, it was plasmashell --replace/kwin --replace, and now it’s systemctl --user restart plasma-plasmashell/systemctl --user restart plasma-kwin_x11.

I know in GNOME, you can r to restart Mutter. Is there a way or plan to do the same for Plasma?

Generally I start by writing a simple bash script to do the job and then bind it.

#!/bin/bash

plasmashell --replace
sleep 2
kwin_x11 --replace

This would work for me I think… you could drag and pin this to a panel if you like.

Using Easystroke, if I do a ‘scribble’ on the desktop it executes the command… something memorable like my Authenticator:
2023-10-07 15:33:41

Using a keyboard shortcut, Ctrl+Alt+R for ‘restart desktop’ and obviously you can still have Ctrl+Alt+Del for killing the X session and logging in clean.

Not sure if there are equivalents for Wayland though, you didn’t give that information.

But why does a user want to restart plasmashell or kwin?

I mean, yes they do crash and restart themselves quite frequently, but the only time I do a manual restart is when I modify plasmashell/kwin code itself.

Why does a GNOME user want to restart Mutter?

2 Likes

When the shell or window manager freezes up. In Plasma’s case, not sure which one freezes up.

1 Like