Activate Screenlock for Lxde

[Issue]
if i am away from my lxde session, i can not find a easy way to lock my screen by means of Screensaver application.

[workarround]
i have tried to make a short cut of Screensaver in my desktop, and than start Screensaver.
In menu ->”File”->”lock screen now”. But this procedure is still too complicated

[Solution]
Edit your lxde configuration file to enable key combination to lock screen.

viĀ  ~/.config/openbox/lxde-rc.xml

And then add the following codes within the <keyboard> tag

<!– Launch Screensaver by userĀ  –>
<keybind key=”C-A-l”>
<action name=”Execute”>
<command>xscreensaver-command -lock</command>
</action>
</keybind>

After the modification, you should log off from your lxde session, if you start your session
again, you can lock your screen with “Ctrl-Alt-L”

[Note]
Please make sure that there is a “space” between the “xscreensaver-command”
and the option “-lock” within the <command> tag, otherwise this will not work.

Advertisements