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?

share|improve this question
up vote 103 down vote accepted

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
share|improve this answer
5  
Oddly enough these can both be run from the Alt-F2 run dialogue (I would have thought killing plasma would have inhibited it the second time) but yeah, works well and stops the flickering. – Oli Jun 24 '14 at 10:39
1  
@Oli That's awesome, I didn't even know about Alt-F2! Thanks – Tobia Sep 9 '15 at 13:18
2  
This doesn't work with KDE 5 Plasma. – Geremia Oct 31 '15 at 3:04
7  
it's plasmashell instead of plasma-desktop in kde5 – dorien Nov 1 '15 at 1:04
    
also it works perfectly with opensuse. – B4NZ41 Jul 6 '16 at 10:59

In KDE5 use "kstart plasmashell" to restart the plasmashell as a service instead of plasmashell &. If you use it that way it 's run as an independed service not connected to the current terminal session (meaning you can close the terminal without the process getting terminated). TLDR:

KDE5 (in Terminal):

killall plasmashell
kstart plasmashell
share|improve this answer
    
Just wanted to say thanks for this! Once in a while Plasma 5 will place this strange black bar at the bottom of my screen just above the taskbar that sits above all windows covering whatever is underneath (you can still interact with stuff underneath you just can't see anything under the bar). No idea what causes it but killall plasmashell ; kstart plasmashell fixes it :) – riskable Sep 2 '15 at 13:30
    
the simplest way to do it is using kquitapp5 for Plasma 5. askubuntu.com/a/663702/72652 (best done in KRunner rather than in a terminal) – Michael Tunnell Aug 30 '16 at 16:43

Well I didn't expect this to work (and it's not exactly what the question asks for) but pressing Alt+F2 and running:

kwin --replace

This reloads KDE's compositor and that seems to fix the flickering. I guess it's a factor into my particular issue.

share|improve this answer
6  
Tried this in Kubuntu 15.04. The command in Kde 5 will be kwin_x11 or kwin_wayland depending on the server running behind – zurdo Apr 28 '15 at 20:47
1  
I actually solved using a combination of all solutions: killall plasmashell kwin --replace (ALT-F2) kstart plasmashell withoud kwin --replace, plasmashell did't restart (Kubuntu 16.04) – clobrano Jun 10 '16 at 9:13
1  
The solution that worked for me was a mix of accepted answer and this one killall plasmashell; kwin --replace & kstart plasmashell & exit (the & exit since i was running it in terminal, otherwise the composer remained dependent on the terminal window being open as instructed here) – Carolus Aug 11 '16 at 13:52

I looked this up because I had an issue where I couldn't open any KDE settings menus, but I didn't really want to reboot or log out. I found that the best way to do it (in KDE 5 at least) is by using krunner (Alt+F2) to killall plasmashell then immediately afterwards, plasmashell. I tried doing it in a Konsole window, using killall plasmashell and then plasmashell & and this worked, but as soon as I closed the Konsole window, plasma would close as well. Even though you seemed to resolve your issue, I figured I would post it for people coming along in the future needing to restart plasma.

In KDE 4, just replace plasmashell with plasma-desktop

share|improve this answer

I find I'm always having trouble with ksycoca5, and this seems to be the reason plasmashell gets in a strop, and also stops plasmashell restarting. To solve this I did:

$ mv ~/.cache/ksycoca5* /tmp
$ killall plasmashell buildksycoca5; kstart plasmashell
share|improve this answer

In KDE4 I find the memory usage ramps up to around a gigglebite pretty rapidly because opening programs progressively uses more RAM, but closing them does not release it. This is in Mint 17.3 with KDE but seems to affect pretty well ALL KDE plasma 4 systems.

I got sick of logging in and out, or using ALT + F2 to kill and restart plasma. So now I just have a script sitting on the panel..

   
!#/bin/bash 
killall plasma-desktop 
plasma-desktop & 
   

Click on the icon and plasma does a close and restart over about 15 seconds or so. I can still use open programs on whichever virtual desktop I am currently using while plasma is restarting.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.