How do you configure the "Leave" option via command line?

I’d like to change the “Leave” option right-click setting, which appears to be in plasma-desktop-appletsrc under the “[ActionPlugins][RightButton;NoModifier]” as “_logout=true” (or false).

Is there a command line option to change that?

Or perhaps a way to change the default value from true to false?

What’s the behavior you’re dissatisfied with, and what would you like to change it to do instead?

We have long running sessions for users. Sometimes they accidentally select the “Leave” option on the from the desktop right click. We have to manually go into the sessions for these users to unselect the Leave option from being in the right click on desktop menu. If they select it, we have to re-start the session for them. Painful for us and them.

When I enable/disable that option, I see where it is writing to that configuration file. I was hoping to find some /etc/skel (or equivalent) for any new sessions would have that option disabled. Barring something like that, a kdewritepref command that would toggle that flag.

Sorry if this sounds off topic but I think it is worth asking.

Are the users able to click “Cancel” after they accidentaly click on the “Leave” option?

Because if they can, then this should not be a big issue. It should be addressed by the end user on the spot.

On the other hand if they cannot click “Cancel” I am wondering if this is due to a restriction (due to modified / more locked down version of KDE software) or due to user inexperience.

If this is in relation to user inexperience then I am afraid you will have much bigger issues on your hands in the long run by using a desktop environment as feature rich as Plasma. Plasma has not been created with the complete user novices in mind. A bare minimum level of computer literacy is expected.

Your users sound a bit like the “zero-dot people” as per the following blog post from Nate:

I get it.

But, the functionality to disable the “Leave” button already exists. I’m just trying to figure out how to change that value via a script or something. Not trying to add functionality.

Good news: the “Leave” menu item has been removed from the desktop right-click menu for over a year. If you’re still seeing it in default installs, it means you’re using a fairly old version of Plasma. I’d recommend upgrading to Plasma 5.27, and then you’ll get what it is you’re looking for automatically!