Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum


Started by handy1912, April 09, 2018, 06:41:27 AM

Previous topic - Next topic


How can I assign the print screen button to do just that?
Have searched  but need step by step instructions.


Openbox keybindings are set in ~/.config/openbox/rc.xml.  Edit this file with your text editor to include a section like the following:
<keybind key="Print">
      <action name="Execute">
        <command>scrot -q 90 -d 15 -e "x-image-viewer $f"</command>

This uses scrot to take the picture after 15 seconds, and then send  it to x-image-viewer for editing.  You will have to change the command to fit your apps and desires.  To launch the process, you have to press Fn+"prt sc".  For other scrot commands, run scrot --help in your terminal, or see pipemenu number 6 in

You probably should put the setting in the "Keybindings for running applications" section.


Install scrot

create somewhere a directory to save your print screens
in my case
I am penguin
my directory o save files is screenshots under /home/penguin/

open leafpad and copy the follow lines

scrot /home/user/screenshots/$(date +%F_%T:%3N).png

// this command will save screen as a file renamed by the date and hour when screen is captured. If you want to save as jpg replace png with jpg extension

Save this files as for example somewhere. In my case I saved this files under /home/penguin/scripts/

All Settings > Keyboard .

Add and assign PtrSc button with  this file ... in my case : /home/penguin/scripts/

Done !

I preferred to the follow buttons combination of Shift+PtrSC to fire up xfce4-screenshooter

Hope it helps

View the most recent posts on the forum