GothAck / javascript-x-server

JavaScript X Server (current protocol prototyping in Node.js, hoping to port to HTML5 for graphics)
Other
127 stars 17 forks source link

How to make xeyes work? #6

Closed chrisdew closed 10 years ago

chrisdew commented 10 years ago

I'm using Ubuntu 12.04LTS and am running the javascript-x-server successfully,

I can see a chequerboard pattern in my browsers.

How do I run xeyes so that it displays in the browser?

DISPLAY=:0 xeyes

works on my local desktop.

What is the value of DISPLAY to use the javascript-x-server?

sidorares commented 10 years ago

Not sure if its still valid but I think it used to listen on port 6042 ( DISPLAY=:42 )

chrisdew commented 10 years ago

Thanks, I found it on DISPLAY=:41.

I don't know X well. Does ":n" always map to tcp port 6000 + n, or is there a mapping file. How does ":0" work, or is it a magic number?

sidorares commented 10 years ago

It depends, I'm not sure what standard covers it but from reading xlib source code and a bit of experimentation:

:n on linux is usually port 6000 + n or '/tmp/.X11-unix/X' + n socket On mac $DISPLAY is often 'somepath:0', in that case whole string (including :0) is socket name

see https://github.com/sidorares/node-x11/blob/master/lib/xcore.js#L567

chrisdew commented 10 years ago

Thanks for your help. On 2 May 2014 16:08, "Andrey Sidorov" notifications@github.com wrote:

It depends, I'm not sure what standard covers it but from reading xlib source code and a bit of experimentation:

:n on linux is usually port 6000 + n or '/tmp/.X11-unix/X' + socket On mac $DISPLAY is often 'somepath:0', in that case whole string (including :0) is socket name

see https://github.com/sidorares/node-x11/blob/master/lib/xcore.js#L567

— Reply to this email directly or view it on GitHubhttps://github.com/GothAck/javascript-x-server/issues/6#issuecomment-42041755 .