LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-12-2006, 03:20 PM   #1
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 637

Rep: Reputation: 32
Is there a command line option to lock the screen?


I need a way to lock the xsession from the command line... is there any comand I can type to lock the screen or lock the xsession?
 
Old 04-12-2006, 07:42 PM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Guess what? It's xlock.
 
Old 04-12-2006, 08:59 PM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Just to make things clear on this, there is no 100% ssecure method to lock your computer so depending on your requirements this might not cut it. Even with the screen locked, Ctrl-Alt-Bkspace will still kill X leaving a malicious user with access to play with your files or even just restart X. Switching to other VTs generally still works as well with the screen locked.

The best way is to start X as so:
Code:
startx; logout
That way as soon as X exits your user logs out so if someone does come along and kill X they won't have access to your terminal either. Might not be applicable if you're just trying to keep your brother off your MSN but probably worth knowing at any rate
 
Old 09-17-2007, 01:11 AM   #4
gauthamk
Member
 
Registered: Jun 2007
Location: Chennai-India
Posts: 39

Rep: Reputation: 15
Wink command to lock the terminal

try this " gnome-screensaver-command --lock" .
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vim 'n' lynx: command line option to search for string Samsara Linux - Software 6 01-02-2013 06:36 PM
Command line option -F means what? TSynergy Linux - Newbie 5 11-15-2005 08:01 PM
Kdetv command line (missing?) option AliDigitaly Linux - Software 0 09-30-2005 05:11 PM
Lock-screen command? halo14 Linux - General 1 04-15-2005 03:37 PM
perl command line option question afshin Programming 2 01-22-2003 08:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration