Lock Screen on Linux (Ubuntu) from Command Line

On Jan 4, 2010 1 comments

Maybe some people want to lock their screen for some reason. And they want to do this with command line or script. To lock the screen on ubuntu, the command you need to run would be like this.

First you have to make sure that the screen saver is running. the command is :

$ gnome-screensaver

Then to lock the screen, you need to run this command :

$ gnome-screensaver-command -l

Those command will make your screen locked.


saravanan said...

this command use for my pc but how to another computer lock screen

Post a Comment