The first thing we need to do is install "xlock" and (for Gnome users) gconf-editor. Just use the following command:
apt-get install xlockmore gconf-editor
Of course, sudo is not required if you are already running as root.
Once that is installed, you can run it with the "xlock" command. Also, you can specify a screensaver with the '-mode XXX' parameter; just run "man xlock" for details.
If you are lazy like me (lazy and crazy? What a combination!) you don't want to start xlock from the terminal or from the Run Application window, so we will define a (Gnome-only) shortcut for it.
The first step is to disable the current Lock Screen shortcut, as that requires XScreenSaver, so go into System / Preferences / Keyboard Shortcuts. Under Desktop, highlight Lock Screen and press the backspace key to disable the shortcut. Once done, we can move on to defining the new keys.
To define the new command, we need to run gconf-editor (press Alt+F2) and (inside the gconf-editor window) navigate to /apps/metacity/global_keybindings (as seen in the screenshot). Once there, choose the first Disabled shortcut (should be run_command_1), type in
Next we define the custom command to be run, just go to the following path (/apps/metacity/keybinding_commands) and enter "/usr/bin/xlock" for command_1. Optionally, you can also specify a -mode, like I did.
And Voila! Exit gconf-editor, and press Ctrl+Alt+L to lock the screen!
Of course, remember to change the password if you use Backtrack, and don't do anything I wouldn't do
0 nhận xét:
Đăng nhận xét