LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2013, 01:54 PM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 339

Rep: Reputation: Disabled
lock machine


is there a way to "lock" a linux machine?
 
Old 02-26-2013, 01:57 PM   #2
tkinsella
Member
 
Registered: Dec 2005
Distribution: CentOS 6.5
Posts: 45

Rep: Reputation: 0
If you are using a GUI,
Ctrl+Alt+l will lock the screen

If on command line, you can just logoff

If you have a process running on the CLI that you want to "Lock" I would recommend using screen to start your process
Code:
# screen
# command you want to run
# ctrl+a d (will disconnect your session but keep your running processes going)
Then you can log off without stopping your processes.
http://www.gnu.org/software/screen/manual/screen.html

Last edited by tkinsella; 02-26-2013 at 01:58 PM. Reason: Added comment on logoff
 
Old 02-26-2013, 07:57 PM   #3
lee88abc
Member
 
Registered: Apr 2011
Location: northeast USA
Distribution: slackware
Posts: 30

Rep: Reputation: 0
screen saver also locks.
whatever distro you use.
 
Old 02-26-2013, 09:47 PM   #4
sniper8752
Member
 
Registered: Oct 2012
Posts: 339

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tkinsella View Post
If you are using a GUI,
Ctrl+Alt+l will lock the screen

If on command line, you can just logoff

If you have a process running on the CLI that you want to "Lock" I would recommend using screen to start your process
Code:
# screen
# command you want to run
# ctrl+a d (will disconnect your session but keep your running processes going)
Then you can log off without stopping your processes.
http://www.gnu.org/software/screen/manual/screen.html
i tried the Ctrl+Alt+l combo, but it did not work. i am running Raspbian wheezy, for my raspberry pi.
 
Old 02-26-2013, 09:53 PM   #5
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Which desktop environment - is it gnome & which version?
In gnmoe CTRL+ALT+l should do the job, but what happend when you used this key combination?
 
Old 02-27-2013, 06:46 AM   #6
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,163
Blog Entries: 10

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
Quote:
Originally Posted by sniper8752 View Post
i tried the Ctrl+Alt+l combo, but it did not work. i am running Raspbian wheezy, for my raspberry pi.
Same here, but I have Slack14_64 Multilib with Xfce 4.10.0.

xlock works, but not the key combination. Yes, I could program the keys to work, but I don't think it's native to every DE.
 
Old 02-27-2013, 07:33 AM   #7
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Raspbian uses LXDE as their desktop manager, using your favorite text editor add the following to ~/.config/openbox/lxde-rc.xml

Code:
<keybind key="C-A-L">      
  <action name="Execute">        
    <command>xscreensaver-command -lock</command>      
  </action>    
</keybind>
This should be located inbetween the XML tags

<keyboard>
...
</keyboard

Type openbox --reconfigure in terminal for changes to take effect.

here is the link to where I found that stuff http://geekacrossthepond.blogspot.co...t-in-lxde.html

Good luck to you!
 
Old 02-27-2013, 09:26 PM   #8
sniper8752
Member
 
Registered: Oct 2012
Posts: 339

Original Poster
Rep: Reputation: Disabled
where can I find the .config?
 
Old 02-27-2013, 09:40 PM   #9
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
He has already mentioned location of file in full path i.e. ~/.config/openbox/lxde-rc.xml

Code:
~$ cat /home/username/.config/openbox/lxde-rc.xml
OR
~$ find . -name "lxde-rc.xml" -print
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
deian yum lock [ ERR] Reading state information E: Could not get lock /var/lock/aptit jayakumar01 Linux - Server 1 12-05-2011 12:26 PM
Knowing Linux machine state (Screen Lock/unlock) logforlinux Programming 12 10-30-2009 09:19 AM
Knowing Linux machine state (Screen Lock/unlock) logforlinux Linux - General 1 10-27-2009 07:29 AM
How to lock the linux machine aruledison Linux - Security 8 04-09-2008 01:08 PM
How to lock the linux machine aruledison Linux - Desktop 1 04-09-2008 09:53 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration