Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get scrrenshot in linux #244

Closed
samantrader opened this issue Aug 12, 2022 · 1 comment
Closed

get scrrenshot in linux #244

samantrader opened this issue Aug 12, 2022 · 1 comment
Labels

Comments

@samantrader
Copy link

i have this code in ubuntu

const screenshot = require('screenshot-desktop');
screenshot( { linuxLibrary : 'imagemagick'}).then((img) => {

            console.log(img)                         
        })

but when run make error :

(node:5024) UnhandledPromiseRejectionWarning: Error: Command failed: import -silent -window root -crop 1024x768+0+0 -screen jpeg:"hosi"
import-im6.q16: unable to read X window image root': Resource temporarily unavailable @ error/xwindow.c/XImportImage/4977. import-im6.q16: missing an image filename jpeg:hosi' @ error/import.c/ImportImageCommand/1276.

@bencevans
Copy link
Owner

I've just replicated it here. This is due to running Ubuntu using Wayland rather than X. We've got a ticket (#220) open to track Wayland support and any pull request would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants