How to relaunch plasma

I had situation where plasma is unresponsive, and i have to kill process. But when i kill it, i don’t know how to launch desktop back.

In windows i could just type: Win+R → Explorer

:sweat_smile: :joy: :rofl:

Try in terminal:

$ systemctl restart --user plasma-plasmashell.service

Can i make command shortcut to not type this every time? Like just open konsole and type: restartplasma

yes, you can use an alias (man alias) in your bash configuration file .bashrc if your distro is using the bash shell by default, located in your /home/$USER directory (unhide all files in Dolphin) .

You can find out what shell you have if you type echo $0 , in that case it would show you /bin/bash. If your distro has another shell by default, let’s say zsh you would have to edit its file called .zshrc.

Edit that file with Kwrite or Kate or use the nano text editor (nano ~/.bashrc) and scroll down, you will find a section with few or many aliases. Add there an alias name according to your liking, in your example

restartplasma='systemctl --user restart plasma-plasmashell.service'

After saving the changes you can

  • restart konsole for the changes to be read
  • or if you don’t want to close it you can source the file with source ~/.bashrc
  • or execute another instance of shell with exec bash

P.S. you can also add another alias if you want changes in plasma configuration to be loaded first with 'systemctl --user daemon-reload && systemctl --user restart plasma-plasmashell.service'

Yeah, that worked for me.

How is the above command with systemctl different from these commands?

`DISPLAY=:0 kquitapp5 plasmashell || DISPLAY=:0 killall plasmashell && DISPLAY=:0 kstart5 plasmashell’

Also, what is the difference between restarting plasma desktop and restarting plasma shell? Is one a subset of the other?

This is helpful: Plasma and the systemd startup – David Edmundson's Web Log