Lock Screen on Linux (Ubuntu) from First Boot

On Jan 4, 2010 2 comments

After my previous post Lock Screen on Linux (Ubuntu) from Command Line, I will continue about lock the screen on the first time your computer boot. On this post, I am only explain lock screen on Ubuntu.

To lock your Ubuntu screen you need to make a script, I will call the script with "lockfirstboot". Make the file,



$ vi lockfirstboot

the file would be like this :

#!/bin/bash
gnome-screensaver
sleep 2
gnome-screensaver-command -l

Then save the file. Don't forget to place that file under /etc/init.d/ to make this script run on startup.

After you place that script under /etc/init.d/, make that file executable. Do this command :

$ chmod +x lockfirstboot

Well done, now your computer will automatically lock the screen after booting.

Note : give a sleep after command "gnome-screensaver" give your system time and make all command executed gracefully.

2 comments:

Miawruu said...

unfortunatelly, I dont use ubuntu :D

but good info for who use ubuntu

zulian said...

you must be using windows then..

Post a Comment