Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Headless is a Node.js wrapper for Xvfb, the virtual framebuffer
JavaScript
tree: b1e6be557d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
index.js
package.json

README.md

node-headless

node-headless makes it easy to start and use Xvfb in node. headless is inspired by xvfb-run - it searches for a free X display number and starts Xvfb on that.

API

var headless = require('headless');

headless(function(err, childProcess, servernum) {
  // childProcess is a ChildProcess, as returned from child_process.spawn()
  console.log('Xvfb running on server number', servernum);
  console.log('Xvfb pid', childProcess.pid);
  console.log('err should be null', err);
});

headless also support an optional number to start searching from.

var headless = require('headless');

headless(200, function(err, childProcess, servernum) {
  // servernum will be at least 200
  console.log('Xvfb running on server number', servernum);
  console.log('Xvfb pid', childProcess.pid);
});

install

With npm, do:

npm install headless
Something went wrong with that request. Please try again.