leonid-shevtsov / headless

Create a virtual X screen from Ruby, record videos and take screenshots.
http://leonid.shevtsov.me/en/headless
MIT License
968 stars 113 forks source link

import: unable to open X server `localhost:100' @ error/import.c/ImportImageCommand/364. #89

Closed DmitryXO closed 6 years ago

DmitryXO commented 7 years ago

I have a fresh install selenium/ff/chrome/ruby/imagemagick and I get this error on headless.take_screenshot

GPif commented 7 years ago

Same issue on linux Kubuntu 17;04

it seems to be because of the way import is call :

system "#{CliUtil.path_to('import')} -display localhost:#{display} -window root #{file_path}"

the presence of 'localhost' trigger this error

ronaldsalas commented 7 years ago

Any updates on this? I'm also experiencing a similar issue on a new Ubuntu 14 and I have no clue where to start investigating. We're on cucumber, with ImageMagick, Rails, Selenium, Chrome.