When I installed my Xubuntu 12.10 Quantal Quetzal. I had a problem with it that was a lack of lock screen which should usually available on Ubuntu (unity). So, you have a same problem with me, here's a quick tutorial on how to enable lock screen on Xubuntu and of course with a shortcut command.


Install XScreensaver
To enable lock screen on Xubuntu, you have to install xscreensave first, simply open the Terminal and run the following command:
  • sudo apt-get install xscreensaver
Once installed, you might want to change some preferences to suit your needs. Press the Xubuntu applications menu, navigate to "Settings Manager" and open "Screensaver". I would like to lock my screen after 10 minutes of inactivity, so I check "Lock Screen After" and set my desired time.


Creating Shortcut for Lock Screen
Basically, you can lock screen by accessing menu "File > Lock Screen Now" from Screensaver Preferences. But if you want a convenience way to do it here's a guide to make the shortcut.


Open XUbuntu Settings Manager and open the "Keyboard" menu. Navigate to "Application Shortcuts" tab and add a new shortcut. Please fill in "Command" field with "xscreensaver-command -lock" (without quotes, of course) and then press "OK".


You will be asked to assign a keyboard combination to execute the command, I use "CTRL+ALT+L" in this tutorial, you can choose whatever keybord combination you want.


You're done! Now every time you want to leave your computer, you can press the shortcut to lock your screen and protect your work.

Regards :)