As much as I enjoy KDE Plasma, it can be a cringeworthy buggy mess of trash sometimes. Not most of the time, but certainly when it doesn’t work. Recently its plasmashell component started crashing on startup in an endless loop, rendering my system’s usability useless. There was nothing I could do from the GUI to stop this, so I wanted to logout by means of the command line.
Here’s what worked for me:
loginctl terminate-user you
This will immediately logout the user “you” and put us back to the user selection screen. It can take a few moments for the selection screen to come up, but when it does we can either pick a different user, or a different Desktop system we want to use (gear icon at the bottom right).
This is a great example why we should always have a backup user, and backup Desktop installed on our system. Don’t forget, we can still run all KDE components (like Dolphin) even when in GNOME, so productivity isn’t affected too much when we have to switch.
Now to sort out this endless crash loop with plasmashell.