Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xvfb-run on OS X

Tags:

linux

macos

xvfb

Is it possible to have xvfb-run on OS X?

I develop a PHP application which uses xvfb-run. Before I worked on Ubuntu and it was OK. Now I've moved onto Mac and the application does not work.

Or maybe any cross-platform alternative is available to use it on both Linux/OS X?

like image 455
Axarsu Avatar asked Aug 22 '14 16:08

Axarsu


People also ask

What is xvfb run?

xvfb-run is a wrapper for the Xvfb(1x) command which simplifies the task of running commands (typically an X client, or a script containing a list of clients to be run) within a virtual X server environment.

What is xvfb Ubuntu?

Xvfb (short for X virtual framebuffer) is an in-memory display server for UNIX-like operating system (e.g., Linux). It enables you to run graphical applications without a display (e.g., browser tests on a CI server) while also having the ability to take screenshots.


1 Answers

X11 is no longer included with OS X:

https://support.apple.com/en-us/HT201341

X11 server and client libraries for OS X are available from the XQuartz project:

http://xquartz.macosforge.org/

I'm not sure if it includes all the other X goodies like Xvfb. In that case you could compile it yourself; with these options:

--disable-xquartz --enable-xvfb --enable-xnest --enable-kdrive 

More info here:

https://www.xquartz.org/Developer-Info.html

IMO: It seems like you would be better of by using wkhtmltoimage straight on the mac osx, removing the need for X:

http://minimul.com/install-osx-wkhtmltoimage-binaries.html

like image 141
acidjunk Avatar answered Sep 29 '22 10:09

acidjunk