Skip to content
X11 node.js network protocol client
JavaScript Other
Find file
Latest commit edbe678 @sidorares Merge pull request #123 from Coldewey/master
Reads message_type from ClientMessage.
Failed to load latest commit information.
autogen initial implementation of xcb xml -> js generation
examples Missing space
lib Fixed datatype returned by message_type on ClientMessage event.
test Adjusted testcase "client-message.js" to match other tests.
.travis.yml build: add node 0.12, 4.2 and 5.0 to matrix start changelog
LICENSE year bump add link to Xplain
package.json Use os-homedir for older node.js versions
test-runner.js Check for errors directly instead of with isError


Gitter X11 protocol client for node.js

Implements core X11 protocol, as well as Xrender, Damage, Composite, Big-Requests, Dpms, Screensaver, XFixes, Shape, XTest, XC-Misc, GLX and Apple-WM extensions.


npm install x11

Windows users: 1) install XMing or Cygwin/X 2) get node-x11 copy (using git or from Github)

CI build status:

Build Status


Core requests usage:

    var x11 = require('x11');

    var Exposure = x11.eventMask.Exposure;
    var PointerMotion = x11.eventMask.PointerMotion;

    x11.createClient(function(err, display) {
        if (!err) {
            var X = display.client;
            var root = display.screen[0].root;
            var wid = X.AllocID();
                wid, root,        // new window id, parent
                0, 0, 100, 100,   // x, y, w, h
                0, 0, 0, 0,       // border, depth, class, visual
                { eventMask: Exposure|PointerMotion } // other parameters
            var gc = X.AllocID();
            X.CreateGC(gc, wid);
            X.on('event', function(ev) {
                if (ev.type == 12)
                    X.PolyText8(wid, gc, 50, 50, ['Hello, Node.JS!']);
            X.on('error', function(e) {
        } else {


tetris game XRENDER gradients OpenGL glxgears OpenGL teapot

In use

  • ntk - higher level toolkit on top of X11
  • node-remote - media center controller
  • tiles - tiling window manager
  • vnc - vnc client.
  • node-ewmh - set of EWMH helpers.
  • OdieWM - window manager
  • Dbusmenu - unity global menu client.
  • AirWM - tiling window manager
  • npdf - pdf viewer
  • tinywm The famous TinyWM written in node.js
  • basedwm Infinite-desktop panning X window manager in LiveScript

X11 resources/documentation:

Other implementations

Server side (protocol + functionality) implementations for js + DOM

would be really great to make completely web based playground page, connecting node-x11 api to DOM based implementation

Something went wrong with that request. Please try again.