OK, you’re on some form of linx with KDE Plasma desktop.
Open a text editor, make a file called lock.sh
paste the following text in the file:
#! /bin/bash
qdbus6 org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript ‘lockCorona(!locked)’
exit
save the file somewhere convenient, right-click it and in the “properties” menu look for “permissions” and move the slider that says “allow executing file as a program”.
Right- click on your desktop, “enter edit mode”, add widget. Look for a widget called “Run”, if you don’t have it installed download it from the store (top right hand corner of that window).
Add the “Run” widget to your desktop, place it somewhere convenient. Exit edit mode. Right click the Run widget, pick an icon you like and in the field where it says" Command" enter the full path to the .sh file you created above.
Now, if you click that button you just made it will lock all settings on your desktop. Including the widget you just made.
The only way to remove the lock is to hit , log in and enter this:
qdbus6 org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript ‘lockCorona(false)’
If you have no idea what this all means you might want to stay away from this method until you do, because it can become confusing how to unlock the system