Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for abstract namespace sockets #171

Open
EchoAbstract opened this issue Jun 6, 2018 · 1 comment
Open

Add support for abstract namespace sockets #171

EchoAbstract opened this issue Jun 6, 2018 · 1 comment

Comments

@EchoAbstract
Copy link

By default xorg opens '/tmp/.X11-unix/X«display number»' as both an abstract namespace and a filesystem based domain socket. If you're running in a snap container you're able to access the abstract namespace socket but not the filesystem socket. (Abstract namespace domain sockets show up as @''/tmp/.X11-unix/X«display number»', but effectively just have a null byte as the first character in the sun_path field, see http://man7.org/linux/man-pages/man7/unix.7.html).

It'd be nice to have node-x11 support the abstract namespace versions of the x11 socket.

There's an NPM module, abstract-socket, that might be useful.

@sidorares
Copy link
Owner

should be easy, I already use it in dbus client - https://github.com/sidorares/dbus-native/blob/7ddc7ebd0b6b988177733a8ac4b2f0aeff70cc73/index.js#L43-L46

Since you already have something to test against - maybe you could try to add abstract-socket support?
Domain socket connection is established here -

node-x11/lib/xcore.js

Lines 642 to 644 in 97a582b

if (socketPath) {
stream = net.createConnection(socketPath);
} else {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants