Author Topic: Use the PrtSc key to save screenshots to the desktop in PeppermintOS Two  (Read 5853 times)

0 Members and 1 Guest are viewing this topic.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18210
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
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 :)

First backup your peppermint-rc.xml file:
Code: [Select]
cp -v ~/.config/openbox/peppermint-rc.xml ~/.config/openbox/peppermint-rc.xml.backup

Now open peppermint-rc.xml for editing:
Code: [Select]
gedit ~/.config/openbox/peppermint-rc.xml

Find the section that reads:-

Quote
<!-- Keybinding for PrintScreen Key --><keybind key="Print"><action name="Execute"><execute>scrot</execute></action></keybind><keybind key="A-Print"><action name="Execute"><execute>scrot -s</execute></action></keybind>

and change it to read:-

Quote
<!-- Keybinding for PrintScreen Key --><keybind key="Print"><action name="Execute"><execute>scrot "Screenshot_%Y-%m-%d_%H:%M:%S.png" -e "mv $f ~/Desktop/"</execute></action></keybind><keybind key="A-Print"><action name="Execute"><execute>scrot -s "Screenshot_%Y-%m-%d_%H:%M:%S.png" -e "mv $f ~/Desktop/"</execute></action></keybind>

SAVE the file.

Back in the terminal, run:
Code: [Select]
openbox --reconfigure
(to let openbox pick up the changes)

Done :)

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:
Code: [Select]
mv -v ~/.config/openbox/peppermint-rc.xml ~/.config/openbox/peppermint-rc.xml.edited
then
Code: [Select]
mv -v ~/.config/openbox/peppermint-rc.xml.backup ~/.config/openbox/peppermint-rc.xml
then
Code: [Select]
openbox --reconfigure

You're now be back to the way things were.
« Last Edit: April 27, 2012, 04:40:17 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal