Unsolved Telegrambot /screenshot
-
Hi, and thanks for such a great add-on to my Magic Mirror. In appreciation of your efforts, I have also just donated.
I have been trying out the TelegramBot, and I like it a lot. However, when I send the screenshot command, I simply get a black picture back. Is there something else I need to Configure?
Thanks
-
Hi, tested and works
maybe it’s depends of your rpi version and your OS ?
-
Good evening. I have just tried it to. I also get a black image back.
RPI5 8GB, MM: 2.26.0, Node: 18.20.2, OS: Raspbian 12 (bookworm arm)
-
Hi, I don’t know really
try
scrot
command (in a terminal) will take a screenshot and will save into a file in the folder that you execute the command
so verify if black too -
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
2pi@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
2export 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.