I'm trying to run an NX server that communicates with node-x11 as the NX client. A remote machine would communicate via HTML Canvas with the NX server.
I'm interested in your thoughts before diving into this. I appreciate any advice.
Not sure I understand what you are trying to achieve.
NX server implemented in node using node-x11 to get screen updates/input events similar to x11vnc?
I can see two approaches
1) implement everything in node:
I recently added basic support for damage and composite extensions so it's now possible to create vnc or nx server
no, vncviewer is just viewer (front end to vnc protocol client), but there is also a server side part for vnc protocol. There is very primitive example in /examples/smoketest/damagetest.js ( https://github.com/sidorares/node-x11/blob/master/examples/smoketest/damagetest.js ). It prints damage notification each time external window updates its surface ( try to launch xeyes, find it's id with xwininfo and start example as node damagetest winID replacing winID with xeyes win id.
node damagetest winID