LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   lock machine (https://www.linuxquestions.org/questions/linux-newbie-8/lock-machine-4175451792/)

sniper8752 02-26-2013 12:54 PM

lock machine
 
is there a way to "lock" a linux machine?

tkinsella 02-26-2013 12:57 PM

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

lee88abc 02-26-2013 06:57 PM

screen saver also locks.
whatever distro you use.

sniper8752 02-26-2013 08:47 PM

Quote:

Originally Posted by tkinsella (Post 4900269)
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.

shivaa 02-26-2013 08:53 PM

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?

Habitual 02-27-2013 05:46 AM

Quote:

Originally Posted by sniper8752 (Post 4900520)
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.

TroN-0074 02-27-2013 06:33 AM

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!

sniper8752 02-27-2013 08:26 PM

where can I find the .config?

shivaa 02-27-2013 08:40 PM

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



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