SparkyLinux Forums

Software & hardware support => Newbie questions => Topic started by: handy1912 on April 09, 2018, 06:41:27 AM

Title: screenshot
Post by: handy1912 on April 09, 2018, 06:41:27 AM
How can I assign the print screen button to do just that?
Have searched  but need step by step instructions.
Title: Re: screenshot
Post by: seppalta on April 09, 2018, 10:39:39 PM
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>
      </action>
    </keybind>

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 http://lxlinux.com/pipemenus.html.

You probably should put the setting in the "Keybindings for running applications" section.
Title: Re: screenshot
Post by: penguin on April 12, 2018, 08:48:17 PM
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

#!/bin/bash
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 screen.sh somewhere. In my case I saved this files under /home/penguin/scripts/

ON my XFCE
All Settings > Keyboard .

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

Done !

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

Hope it helps