How can I take a screenshot in LXDE using scrot and the Print Screen button on my keyboard? The Windows Manager appears to be Openbox.


1 Answer 1


Edit ~/.config/openbox/lxde-rc.xml with your favorite text editor and then, within the existing <keyboard> element, add the following lines:

<keybind key="Print">
  <action name="Execute">

Use the openbox --reconfigure command to use the new settings.

Following the restart, a screenshot will be created in your /home/pi directory every time you press the Print Screen button.

There's also a GUI tool called obkey which can make editing the Openbox config file easier. You can find it here.

  • I found the lxde-rc.xml file in the following location: "/home/pi/.config/openbox/". The lxde-rc.xml file has a comment at the beginning "Do not edit this file, it will be overwritten on install. Copy the file to $HOME/.config/openbox/ instead". If I edit /home/pi/.config/openbox/lxde-rc.xml am I doing it in the right place?
    – Andrew Fogg
    Jun 17, 2012 at 11:08
  • 1
    @AndrewFogg That's the right place :)
    – Jivings
    Jun 17, 2012 at 12:10
  • @AndrewFogg: Restarting the Pi is overkill. Restarting the window manager would be sufficient.
    – finnw
    Jun 17, 2012 at 12:24
  • 1
    @finnw In fact all you need to do is type openbox --reconfigure
    – Jivings
    Jun 17, 2012 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .