Check current screen lock settings
First, verify your current screen lock configuration:
For GNOME:
Should return 'true' if password is required.
For KDE Plasma:
Should return '1' or 'true' if auto-lock is enabled.
How to enable password-protected screen lock
GNOME (Ubuntu, Fedora, Debian)
- Open Settings
- Navigate to Privacy & Security → Screen Lock
- Enable Automatic Screen Lock
- Set Automatic Screen Lock Delay to your preference (5 minutes recommended)
- Enable Lock Screen on Suspend
Or via command line:
KDE Plasma
- Open System Settings
- Go to Workspace Behavior → Screen Locking
- Enable Lock screen automatically
- Set timeout to 5 minutes or less
- Enable Lock screen on resume
- Check Require password after locking
XFCE
- Open Settings Manager
- Click on Screensaver
- Enable Enable Screensaver
- Check Lock screen when screensaver is active
- Set appropriate timeout values
MATE Desktop
- Open Control Center
- Click on Screensaver
- Check Lock screen when screensaver is active
- Set Regard the computer as idle after to 5 minutes or less
Additional Security Options
Configure manual lock shortcuts for immediate protection:
Common keyboard shortcuts:
- Super + L - Most desktop environments
- Ctrl + Alt + L - Alternative shortcut
Command line lock:
# KDE
qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock
# Generic (works with most lockers)
loginctl lock-session
Best Practices
- Set screen lock timeout to 5 minutes or less for optimal security
- Always manually lock your screen when leaving your computer
- Use a strong password or passphrase for your user account
- Consider using biometric authentication if available
- Enable lock on suspend/sleep for laptops
Important Notes
- Screen lock only protects against casual access - disk encryption provides stronger protection
- Some applications may prevent the screensaver from activating (video players, presentations)
- Virtual machines may have different lock behavior than the host system
- Password requirements should match your organization's security policy