# xvfb

> Easily start and stop an X Virtual Frame Buffer from your node apps.

Latest version **0.4.0** (published 2020-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install xvfb
pnpm add xvfb
yarn add xvfb
bun add xvfb
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2020-07-05 |
| First published | 2012-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 104 |
| Author | Rob Wu |
| Maintainers | paulbaumgart, rob-w |

## Links

- npm: https://www.npmjs.com/package/xvfb
- Repository: https://github.com/Rob--W/node-xvfb
- Homepage: https://github.com/Rob--W/node-xvfb#readme
- Issues: https://github.com/Rob--W/node-xvfb/issues
- npm.io page: https://npm.io/package/xvfb

## Dependencies (1)

- [sleep](https://npm.io/package/sleep.md) 6.1.0

## Recent versions

- 0.4.0 (latest) — 2020-07-05
- 0.3.0 — 2019-12-10
- 0.2.3 — 2015-12-23
- 0.2.2 — 2015-08-02
- 0.2.1 — 2015-05-01
- 0.2.0 — 2012-07-17
- 0.1.0 — 2012-07-17
- 0.0.1 — 2012-07-07

## README

node-xvfb: easily start and stop an X Virtual Frame Buffer from your node apps.
-----

### Usage

```javascript
var Xvfb = require('xvfb');
var xvfb = new Xvfb();
xvfb.startSync();

// code that uses the virtual frame buffer here

xvfb.stopSync();
// the Xvfb is stopped
```

or:


```javascript
var Xvfb = require('xvfb');
var xvfb = new Xvfb();
xvfb.start(function(err, xvfbProcess) {
  // code that uses the virtual frame buffer here
  xvfb.stop(function(err) {
    // the Xvfb is stopped
  });
});
```

The Xvfb constructor takes four options:

* <code>displayNum</code> - the X display to use, defaults to the lowest unused display number >= 99 if <code>reuse</code> is false or 99 if <code>reuse</code> is true.
* <code>reuse</code> - whether to reuse an existing Xvfb instance if it already exists on the X display referenced by displayNum.
* <code>timeout</code> - number of milliseconds to wait when starting Xvfb before assuming it failed to start, defaults to 500.
* <code>silent</code> - don't pipe Xvfb stderr to the process's stderr.
* <code>xvfb_args</code> - Extra arguments to pass to `Xvfb`.

### Thanks to

* [kesla](https://github.com/kesla) for https://github.com/kesla/node-headless
* [leonid-shevtsov](https://github.com/leonid-shevtsov) for https://github.com/leonid-shevtsov/headless
* [paulbaumgart](https://github.com/paulbaumgart) for creating the initial version of this package.

both of which served as inspiration for this package.

---
_Source: https://npm.io/package/xvfb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
