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?

6
  • have you checked your crontab entries?
    – Aloha
    Commented Jul 6, 2016 at 2:06
  • nothing related in the crontab
    – cfye14
    Commented Jul 6, 2016 at 2:29
  • Look at the header of the files. Are there some hints in them?
    – ott--
    Commented Jul 6, 2016 at 8:01
  • What exactly do you mean by file headers and how should I access those?
    – cfye14
    Commented Jul 6, 2016 at 23:00
  • image sizes were all for full desktop
    – cfye14
    Commented Jul 6, 2016 at 23:06

4 Answers 4

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.

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.

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
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.