ponty / pyscreenshot

Python screenshot library, replacement for the Pillow ImageGrab module on Linux.
BSD 2-Clause "Simplified" License
502 stars 88 forks source link

Run on separate display while parent script is in main display #77

Closed the-white-light closed 3 years ago

the-white-light commented 4 years ago

I was hoping for a way to specify which display (eg. :1, :2, etc.) pyscreenshot takes from without having the parent script operating on the same display.

ponty commented 4 years ago

This should work if you have an X backend:

os.environ["DISPLAY"] = ":99"
im = grab()