Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have already installed scrot following the instructions here. The Windows Manager appears to be Openbox.

share|improve this question

migrated from raspberrypi.stackexchange.com Jul 10 '12 at 18:26

This question came from our site for users and developers of hardware and software for Raspberry Pi.

1 Answer 1

up vote 6 down vote accepted

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">
    <command>scrot</command>
  </action>
</keybind>

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.

share|improve this answer
    
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 '12 at 11:08
1  
@AndrewFogg That's the right place :) –  Jivings Jun 17 '12 at 12:10
    
@AndrewFogg: Restarting the Pi is overkill. Restarting the window manager would be sufficient. –  finnw Jun 17 '12 at 12:24
1  
@finnw In fact all you need to do is type openbox --reconfigure –  Jivings Jun 17 '12 at 13:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.