octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.3k stars 949 forks source link

Segmentation Fault - Docker, Latest Robot JS Bionic Node 12 #614

Open deepziem opened 3 years ago

deepziem commented 3 years ago

robotjs.get screensize throwing this error. Docker and Linux.

Env Variable below

ENV DISPLAY=:0.0 
--OR--
ENV DISPLAY=:0
--Both has same error--

.. Others
ENV SCREEN_WIDTH=1366
ENV SCREEN_HEIGHT=768
ENV SCREEN_DEPTH=24
....

Run Script

RUN DISPLAY=:0.0 npm run scriptname....xxxx;

Error


Could not open main display
Segmentation fault


## Your Environment
* RobotJS version: latest
* Node.js version: 12+
* npm version: Latest corresponding to 12+
* Operating System: Bionic/Ubuntu
xujingzhou commented 3 years ago

me too under centOS.