4

First, about a week ago, i saw a series of screenshot files attributed to scrot separated by a second in my home directory, e.g. 2016-06-25-02030[1-9]. I was working on something that required me to frequently reboot at the time. I did not use the scrot bash command.

Now, over the last three days, I see three more scrot files, and I've not used scrot over the last few days. I see no keyboard shortcuts for scrot. I see no easy way to take a screenshot in raspbian, using scrot as the default application. It looks like I have no related bash aliases. What could it be?

cfye14
  • 177
  • 1
  • 1
  • 6

4 Answers4

2

Do you have a cat? Could it have accidentally walked over the keyboard and hit the Prt Sc key?

Raspbian's GUI sets up the Print Screen key to call scrot by default. Check the config file .config/openbox/lxde-pi-rc.xml to see if it has any references to the command.

scruss
  • 9,117
  • 1
  • 25
  • 36
1

I am using a Bluetooth num/keypad (not a full keyboard) with all keys mapped specific to my app and with stickers on top of them. And I also started to notice lots of screenshots in my home directory. Then I realised that one of the keys I have mapped in my app is actually a print screen key on this Bluetooth physical keyboard! If you by any chance have an odd keyboard with such key that could be the explanation.

I stumbled across this post while looking for a way to disable this because I really want to use that key for something else in my app. The config file mentioned in one of the other answers doesn't exist on my Raspbian.

I did not find where to disable the mapping of print screen to scrot, however in https://askubuntu.com/questions/279496/how-to-disable-print-screen-shortcut the second answer suggests just replacing the screenshotting binary with an empty bash script which is what I did.

sudo mv /usr/bin/scrot /usr/bin/scrot.bak

Create new file /usr/bin/scrot with following contents:

#!/bin/bash

then change ownership

sudo chmod a+x /usr/bin/scrot
jbasko
  • 111
  • 3
1

If you haven't already changed the default password and disconnected from the Internet, start there. If the scrot captures continue check /etc/rc.local for odd entries.

Andy Anderson
  • 649
  • 1
  • 4
  • 11
0

as of scrot, open/edit .config/openbox/lxde-pi-rc.xml

replace scrot with (single line)

scrot -q 1 '%Y-%m-%d_%H-%M-%S_$wx$h_scrot.png' -e 'mv $f ~/Pictures/Screencaps/' 

(or whatever directory you like)

and you have a handy screenshot dairy preventing scrot from overwriting and cluttering up the home dir.

Quintin B
  • 689
  • 1
  • 5
  • 20