Kubuntu 22.04 – How to Reset Plasma 5 Desktop

Kubuntu is my distribution of choice. I really like the flexibility of the KDE Desktop. But, pretty much every time I install Kubuntu, something goes haywire with the desktop, typically it is panels behaving strangely. For instance, I have dual monitors. I like to have a panel on the far right side of my two monitors and another panel on the far left side. I also only want those panels to show me the windows that are on the respective monitors. KDE can make this happen, but it occasionally happens that the panels get screwed up and they start showing windows from both monitors or one panel will show windows from the wrong monitor. (This can happen if you switch where the cables are plugged in or change your monitor settings.) This is extremely annoying!

There is a solution. It’s actually not that hard, but it does require following some very specific steps. Imagine you have a situation like the one I described above where your Plasma Desktop panels in KDE are not working correctly. Here’s how you can do a complete reset of the Plasma 5 Desktop in Kubuntu 22.04.

1) To be clear, I’m running Kubuntu 22.04 with KDE Plasma Version 5.24.4 (date: 2022/07/18).

2) The settings for the Plasma Desktop and panels are now all incorporated into a single file that is stored in your ~/.config folder (which is here: /home/USER/.config). That file is:

plasma-org.kde.plasma.desktop-appletsrc

You can see my file here:

Rather than wade through that file and try to fix what went haywire, my preferred approach is just to delete it and start over.

What you need to do is either delete that file or make a backup of it (so it is re-named). But you can’t do that while you’re logged into the Plasma Desktop as it will get over-written when you log out.

3) Log out of your Plasma Desktop session by going to “Shutdown” or “Restart” and then select “Log Out” instead.

4) This will log you out of the Plasma Desktop. You’ll see the login screen:

But what you want is actually a console. Hit CTRL + ALT + F2 and that will bring up a console.

5) You’ll need to log in. So, enter your username first, then your password. Then, you can either delete the file with all the Plasma Desktop settings like this:

sudo rm ~/.config/plasma-org.kde.plasma.desktop-appletsrc

Or you can make a backup like this:

sudo mv ~/.config/plasma-org.kde.plasma.desktop-appletsrc ~/.config/plasma-org.kde.plasma.desktop-appletsrc-old

Either way, the goal is basically to make that file of Plasma Desktop settings invisible to the operating system so that when the computer restarts, it will reset the Plasma Desktop back to the defaults and rebuild that file.

When you’re done you can either reboot your system:

reboot

Or hit CTRL + ALT + F1, which will take you back to the login screen. When you log back in, everything should be reset to defaults.

Here is my desktop with the panel on the left side before resetting the Plasma Desktop:

And here is my desktop with the default panel on the bottom after resetting the Plasma Desktop:

FYI, this process was different under Plasma 4. This only works on the latest versions of Plasma.

Loading

Comments

5 responses to “Kubuntu 22.04 – How to Reset Plasma 5 Desktop”

  1. stefan.n pofahl Avatar
    stefan.n pofahl

    This file is gone, a restart don’t bring it back on my machine.
    I have wrong values of environment variables but I have not yet figured out how to change them:
    XDG_SESSION_TYPE=wayland
    XDG_MENU_PREFIX=gnome-

  2. anon Avatar
    anon

    Thanks! Helped me fix my broken applets.

  3. Michael Bristol Avatar
    Michael Bristol

    Many thanks,
    Your graphic uploads in logical order and instructions really helped me out.
    After messing it up, my KDE desktop looks nice again.

  4. Jack Schakter Avatar
    Jack Schakter

    Couple of observations:
    1) You shouldn’t need to run sudo on your own $USER directories
    2) No need to reboot, just log out/back in to see the changes.

  5. Hugo Avatar
    Hugo

    The sudo is not needed as the files are owned by the user you already logged in as.
    Only use sudo when you really need to do something as root.

    You also have ~/.config/plasmashellrc ~/.config/plasmanotifyrc ~/.config/plasmarc and so on and there is all the other pieces that can also cause you a lot of trouble like most of the files and directories ~/.config/k* ~/.config/baloo* ~/.config/akonadi* , sadly after abandoning the ~/.kde directory, there is no simple way to just start fresh.

Leave a Reply

Your email address will not be published. Required fields are marked *