Unable to restart plasmashell from terminal

Much faster than rebooting, though. And for a few weeks, on one machine, I was having to use it sometimes several times a day.

1 Like

Ouch…Plasma hangover :woozy_face:

2 Likes

So running plasmashell --replace & won’t hurt a normally working plasma?

Sometimes kwin_x11 --replace& is better instead of restarting plasmashell, particularly if working around memory leak issues.

It shouldn’t. Just be mindful from which shell session you run it. For example, do not run it from a terminal emulator running in a Plasma session :rofl:

Well it seems like it’s working okay. :grimacing:

Dammit…i’m puzzled, can somebody please explain what am i missing here?

Situation 1

I execute this command in Terminal which uses bash shell:

killall plasmashell ; kstart5 plasmashell > /dev/null 2>&1

It does exactly what it need to:

  1. Kills all plasmashell stuff
  2. Starts new instance in it’s own process

you close terminal and everything is good and fine.

Situation 2

I create executable bash script Test.sh

#!/bin/bash

killall plasmashell ; kstart5 plasmashell > /dev/null 2>&1

Then run it and what happens is:

  1. It kills plasmashell
  2. Nothing, just darkness of not starting plasmashell

Yes, those are exactly same lines of code…My question is simple WTF!?! :exploding_head: :exploding_head: :exploding_head:

Just tested it, I get the same result whether I run the command in an interactive shell session (on Zsh) or from a script (Bash). Plasmashell is properly killed and started either way.

1 Like

I’ve tested on 2 EnOS KDE instances, 1 fresh EnOS KDE VM and even 1 fresh Manjaro KDE VM - always the same for me… :exploding_head:

Why oh why…

Goddamn…Guess what?

I’ve launched script via RMB - Run In Konsole.
When i’m doing it in Terminal ./Test.sh or bash ./Test.sh - it’s fine!!! :exploding_head:

Can you confirm?

If you can - i guess that deserves a goddamn bug report filled, if i’ve seen one…

1 Like

Yes, can confirm, but it’s not unexpected.

1 Like

Why?

This works with “Run in Konsole” right click option:

#!/bin/bash

killall plasmashell
setsid kstart5 plasmashell > /dev/null 2>&1
1 Like

Indeed, but why the difference?

Not really sure why it doesn’t work without setsid, but I know why it works with it: setsid just starts a new non-interactive shell session which is not a child process of the shell session running in Konsole, and in it, it runs kstart5 plasmashell.

1 Like

Well, anyways i’m really glad we’ve managed to figure that one out, saved me sanity today otherwise i’d killall ! :rofl:

Still, if someone else have knowledge of why that happens - i’d really appreciate it, seems like a useful knowledge is hidden in that difference :slight_smile:

1 Like

I didn’t even know that there was a “Run in Konsole” option in the right-click menu. :rofl:

I’m a simple man, when I run script, I type: ./script :man_shrugging:t3:

4 Likes