Use the PrtSc key to save screenshots to the desktop in PeppermintOS Two

I don’t know if you’ve noticed, but in Peppermint if you hit the PrtSc (Print Screen) key Peppermint takes a screenshot and saves it as a .png in your Home folder (but with an odd filename format).

PrtSc = Full Screenshot.
Alt+PrtSc = Interactively select a window or rectangle with the mouse.

I prefer my screenshots saved directly to my desktop by default … if you’re like me, here’s how to do it …

Not only will they save to your desktop, but they’ll have the much more readable filename format - Screenshot_2012-04-27_01:58:18.png

FYI, Peppermint uses an application called “scrot” for taking screenshot, and the key bindings are contained in your
~/.config/openbox/peppermint-rc.xml
file.


OK, here goes :slight_smile:

First backup your peppermint-rc.xml file:

cp -v ~/.config/openbox/peppermint-rc.xml ~/.config/openbox/peppermint-rc.xml.backup

Now open peppermint-rc.xml for editing:

gedit ~/.config/openbox/peppermint-rc.xml

Find the section that reads:-

scrotscrot -s

and change it to read:-

scrot "Screenshot_%Y-%m-%d_%H:%M:%S.png" -e "mv $f ~/Desktop/"scrot -s "Screenshot_%Y-%m-%d_%H:%M:%S.png" -e "mv $f ~/Desktop/"

SAVE the file.

Back in the terminal, run:

openbox --reconfigure

(to let openbox pick up the changes)

Done :slight_smile:

Test both “prtSc” and “Alt+PrtSc” … they should now save to the desktop not your home folder … the screenshots will also be saved with a filename that makes more sense … like Screenshot_2012-04-27_01:58:18.png


To UNDO -

Run:

mv -v ~/.config/openbox/peppermint-rc.xml ~/.config/openbox/peppermint-rc.xml.edited

then

mv -v ~/.config/openbox/peppermint-rc.xml.backup ~/.config/openbox/peppermint-rc.xml

then

openbox --reconfigure

You’re now be back to the way things were.