LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 10-10-2008, 04:44 AM   #1
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4
Thanked: 0
How to lock screen when idle for 30 min?


[Log in to get rid of this advertisement]
Hi,

Can anybody tell me how to automatically lock the screen on Linux plateform for root user when idle for 30 min?

Thanks in Advance!!!

Regards,
Ankur

Last edited by dewdrops_ankur; 10-10-2008 at 04:50 AM..
dewdrops_ankur is offline  
Tag This Post ,
Reply With Quote
Old 10-10-2008, 06:33 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Thanked: 1
You can logoff automatically with bash shell after 30 min if you want,
just add in /root/.bashrc file this line:
Code:
export TMOUT=1800
This will logoff root user after 30min of inactivity
keefaz is offline     Reply With Quote
Old 10-10-2008, 11:20 AM   #3
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4
Thanked: 0

Original Poster
Quote:
Originally Posted by keefaz View Post
You can logoff automatically with bash shell after 30 min if you want,
just add in /root/.bashrc file this line:
Code:
export TMOUT=1800
This will logoff root user after 30min of inactivity
Thanks for the response.

But i want to lock the screen as if i logoff all mine unsave data will be lost.

Regards,
Ankur
http://planetofsolutions.blogspot.com
dewdrops_ankur is offline     Reply With Quote
Old 10-10-2008, 11:45 AM   #4
TB0ne
Senior Member
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, Mandrake, RedHat, Gentoo, Slack
Posts: 4,074
Thanked: 143
Quote:
Originally Posted by dewdrops_ankur View Post
Thanks for the response.

But i want to lock the screen as if i logoff all mine unsave data will be lost.
Turn on your screen saver in whatever window-manager you're using, and set it to lock the screen after 30 minutes.
TB0ne is offline     Reply With Quote
Old 10-10-2008, 12:54 PM   #5
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4
Thanked: 0

Original Poster
For non-root users, its allowed to set the screensaver,but for root user if we execute xscreensaver-demo, it throws error.

For non-root users, my screensaver is working properly.

Please suggest something for root also, if possible in linux to lock the screen at console
dewdrops_ankur is offline     Reply With Quote
Old 10-10-2008, 02:48 PM   #6
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: Debian Lenny / Squeeze / Sid
Posts: 7,213
Blog Entries: 5
Thanked: 246
Look at vlock and screen both are capable of locking

http://www.cyberciti.biz/tips/increa...enconsole.html
farslayer is offline     Reply With Quote
Old 10-11-2008, 02:38 AM   #7
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4
Thanked: 0

Original Poster
Quote:
Originally Posted by farslayer View Post
Look at vlock and screen both are capable of locking

http://www.cyberciti.biz/tips/increa...enconsole.html
Can you please tell how to use vlock?
i tried but was not successful.
Actually i want to lock the screen automatically after some idle time for root user?

Regards,
Ankur
http://planetofsolutions.blogspot.com/
dewdrops_ankur is offline     Reply With Quote
Old 10-11-2008, 03:05 AM   #8
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 288
Thanked: 1
find a way to get the screen saver to work *shrug*.
checkmate3001 is offline     Reply With Quote
Old 10-12-2008, 11:55 PM   #9
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: Debian Lenny / Squeeze / Sid
Posts: 7,213
Blog Entries: 5
Thanked: 246
That will lock a console. I do not know how you would automate it. Why not just lock it before you walk away ? That is the simple solution now that you have away to lock it..

lockvc can be automated but it will not lock any vc's owned by 0 which would be root.. so that won't help.
farslayer is offline     Reply With Quote
Old 10-13-2008, 08:18 AM   #10
win32sux
Moderator
 
Registered: Jul 2003
Distribution: Ubuntu 8.10
Posts: 8,608
Thanked: 108
dewdrops_ankur, stop including a link to your blog with your posts. You are instead encouraged to add the link to your signature, which would make it automatically visible to all members in all your posts. If you continue posting your link like this you will risk losing your LQ privileges. If you have any questions regarding this public warning you have just received, contact me via email. Do NOT use this thread to discuss the matter (the same goes for everyone else).

Last edited by win32sux; 10-13-2008 at 08:20 AM..
win32sux is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GDM "Lock screen" item fails to lock down. Swan1 Suse/Novell 9 02-03-2009 01:00 AM
close, min, max buttons top right of screen trailer8713 Linux - Newbie 1 02-21-2008 05:26 PM
3.8 Gb Suse 10.1 slow install in 1h30 min. Mandriva 2006 was less than 40 min Emmanuel_uk Linux - Distributions 2 06-15-2006 10:27 AM
How to disable Lock Screen when close laptop screen? amosbatto Linux - Laptop and Netbook 2 01-17-2006 12:12 AM
Screen Lock up when enabling full screen in VLC unux82 Linux - Software 0 07-20-2005 04:01 AM


All times are GMT -5. The time now is 06:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration