3

How can I automatically lock the screen when idle in CentOS?

I would like it so that a user has to re-enter their password once the machine has been idle for a period of time.

If there is no option to do this in CentOs, what other solutions would allow me to achieve this?

3
  • What is the desktop environment you are using???? gnome????
    – user637152
    Jul 11, 2012 at 8:53
  • yes,,it's GNOME...=)
    – trguapo
    Jul 11, 2012 at 9:10
  • You can use xscreensaver.
    – user315052
    Jul 11, 2012 at 9:20

3 Answers 3

2

I found the solution to this in the below link

http://ejd021-linux.blogspot.in/2011/06/how-to-lock-screen-in-centos.html

you may need to change the ftp url's to

wget ftp://ftp.sunet.se/pub/Linux/distributions/centos/5/os/x86_64/CentOS/libXp-1.0.0-8.1.el5.x86_64.rpm

and

wget ftp://ftp.sunet.se/pub/Linux/distributions/centos/5/os/x86_64/CentOS/openmotif-2.3.1-7.2.el5.x86_64.rpm

the third URL given works fine. Just follow the instructions on the blog and you will be fine.

1

Go to System -> Preferences -> Screensaver Then change the computer idle time and enable Lock screen when screen saver is idle settings.

1
  • it doesn't work for my Cent0s 5.8,,and i want to emphasize that i'm logging in as root,,I want to login as root! =)
    – trguapo
    Jul 11, 2012 at 9:36
0

try using the following commands Set the idle delay by replacing 1 with the delay you want. The time is in minutes.

gconftool-2 --type int --set /desktop/gnome/session/idle_delay 1

set the disable_lock_screen false to ask for password after idle time out or disable_lock_screen true for no password after idle timeout.

gconftool-2 --type bool --set /desktop/gnome/lockdown/disable_lock_screen false

You must log in to answer this question.