Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

screenshot

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

Previous topic - Next topic

handy1912

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

seppalta

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.

penguin

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


View the most recent posts on the forum