Advertising

Author Topic: screenshot  (Read 274 times)

Offline handy1912

  • Newbie
  • *
  • Posts: 11
screenshot
« 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.

Offline seppalta

  • Full Member
  • ***
  • Posts: 171
Re: screenshot
« Reply #1 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:
Code: [Select]
<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.

Offline penguin

  • Jr. Member
  • **
  • Posts: 82
Re: screenshot
« Reply #2 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