I'm looking to develop a web-application that translates request parameters into a PNG/GIF chart. I'm looking to reuse an open source charting library, but I have concerns about the scalability.

A long time ago, we were using a single Xvfb buffer to render our image into, but that basically meant servicing only one incoming request at a time.

According to the man page it seems we can create numerous buffers? If so, is it simply ensuring there is enough physical RAM to prevent excessive paging?


You can use xvfb-run your-command. It takes care of set up and clean up.

From the man page:

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. xvfb-run sets up an X authority file, writes a cookie to it (see xauth(1x)) and then starts the Xvfb X server as a background process. The process ID of Xvfb is stored for later use. The specified command is then run using the X display corresponding to the Xvfb server just started and the X authority file created earlier.

When the command exits, its status is saved, the Xvfb server is killed (using the process ID stored earlier), the X authority cookie removed, and the authority file deleted. xvfb-run then exits with the exit status of command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.