LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > 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

Reply
 
LinkBack Search this Thread
Old 10-10-2008, 03:44 AM   #1
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
How to lock screen when idle for 30 min?


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 03:50 AM.
 
Old 10-10-2008, 05:33 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282

Rep: Reputation: 61
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
 
Old 10-10-2008, 10:20 AM   #3
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 10-10-2008, 10:45 AM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 10,003

Rep: Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189
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.
 
Old 10-10-2008, 11:54 AM   #5
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 10-10-2008, 01:48 PM   #6
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,230
Blog Entries: 5

Rep: Reputation: 185Reputation: 185
Look at vlock and screen both are capable of locking

http://www.cyberciti.biz/tips/increa...enconsole.html
 
Old 10-11-2008, 01:38 AM   #7
dewdrops_ankur
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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/
 
Old 10-11-2008, 02:05 AM   #8
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 294

Rep: Reputation: 31
find a way to get the screen saver to work *shrug*.
 
Old 10-12-2008, 10:55 PM   #9
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,230
Blog Entries: 5

Rep: Reputation: 185Reputation: 185
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.
 
Old 10-13-2008, 07:18 AM   #10
win32sux
Moderator
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
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 07:20 AM.
 
  


Reply

Tags
lock, screen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 12:00 AM
close, min, max buttons top right of screen trailer8713 Linux - Newbie 1 02-21-2008 04: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 09:27 AM
How to disable Lock Screen when close laptop screen? amosbatto Linux - Laptop and Netbook 2 01-16-2006 11:12 PM
Screen Lock up when enabling full screen in VLC unux82 Linux - Software 0 07-20-2005 03:01 AM


All times are GMT -5. The time now is 12:38 AM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration