Corrado,
Yes, that command will lock the screen and will require a password (assuming the system has a password set). No, it only works for gnome. I’m not sure what the command would be to set it for KDE but if you right click on the desktop > Configure Desktop > Screen Saver, you can pick a screen saver and configure lock out times.
|