Thanks for the fast answer.
When I wrote scrot in a terminal I got following message: “scrot: Can’t open X display. It is running, yeah? [NULL]”
Then I searched on the www and found a solution: “https://andreas.scherbaum.la/post/2020-02-10_raspberry-pi-take-a-screenshot-from-a-display-with-no-keyboard-and-mouse/”
"All I had to do was to teach scrot where the display is. If you start it without any display settings, it can’t connect to the X Server:
1
2
pi@raspberrypi:~ $ scrot
giblib error: Can’t open X display. It is running, yeah?
The following environment variables need to be set: DISPLAY (pointing to the first display, which is 0), and XAUTHORITY (pointing to the Xauthority file of the currently logged in user):
1
2
export DISPLAY=:0
export XAUTHORITY=/home/pi/.Xauthority
"
After that scrot is working with “scrot”. But when I try with telegrambot, I’m gettint still a black image back. The screenshots also black when I open them in the desktop.
But no problem. It’s not necessary for me. I came across the topic by chance. Maybe it will help someone else.
But what I also noticed. That the command (Telegram) /reboot does not work. And this is also not to be found under the /commands. /shutdown is available, but switches off the complete RPI.