shot() not working on Ubuntu through VNC
Hi there, Thanks for your awesome library which is working like a charm on my local Mac.
However, I need to port it to ubuntu but when I run the shot() function I get the following error : (It's is through VNC, running vnc4server)
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 149 (RANDR)
Minor opcode of failed request: 8 (RRGetScreenResources)
Serial number of failed request: 11
Current serial number in output stream: 11
Any clue about where it's coming from?
Thanks!
When you tried on Mac, was it via VNC too?
No, directly on my Macbook
On 21 Apr 2018 at 19:11 +0700, Mickaël Schoentgen [email protected], wrote:
When you tried on Mac, was it via VNC too? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Could you post the minimal code to reproduce?
Also, what is the value of the DISPLAY envar?
of course.
echo $DISPLAY
Result : :1
code :
import mss
sct = mss.mss()
img = sct.shot()
sct.monitors produces the same error
thanks for you help
Try this:
sct = mss.mss(display=':1')
Unfortunately I get the exact same error
There is something wrong/not handled with VNC. I never tested it. It would be great if you have the possibility to investigate, else I will check when I have some free time.
Allright, I'll try to find something helpful. Thanks for your help
Some clues:
- https://askubuntu.com/a/672000
- https://lists.gt.net/vnc/list/33382