A tutorial to build a custom screen-lock
Install two packages by executing following commands:
sudo apt-get install xautolock xlockmore
Once installed enable
xlock daemon on every time system starts by adding the entry to
Startup Applications. Following steps will help:
- Open Startup Applications:
Click Add button to open Add Startup Program window.
Then fill with
xautolock -time 10 in Command text-box. It will lock the screen after every 10 minutes if the system is being idle for 10 minutes. 10 can be replaced by any natural number. Click Add and then finally Close. Following screen will help:
That's it. A simple screen-lock is ready! :) Login and Logout to check whether it is working or not.
To stop the
xlock daemon i,e if don't want to lock the screen any more type followng command in terminal:
also remove the command under
Starup Applications. Get more options and help by:
man xautolock and
Working can be checked by executing following command if above two packages are installed:
xautolock -time 1
If left idle for 1 minute the system will be locked. Actually the command runs the executes the
xlock daemon which locks the system.
Feel free to edit it to make it more clear and interactive. Any types of comments and suggestions are most welcome.