sidorares / node-x11

X11 node.js network protocol client
MIT License
518 stars 72 forks source link

Use X11 in electron ? #173

Open monok-o opened 6 years ago

monok-o commented 6 years ago

Hello, I would want to try to integrate a native application Linux into a window made with electron. I thus turned to your library but I do not too much know how to take myself there.

Thank you in advance and sorry for my bad English.

sidorares commented 6 years ago

yes, should be possible

depends on type of integration you want. It's relatively easy to use it for external integration ( communicate using EWMH, use clipboard / window selections etc ). Probably not so easy to interact with controls inside electron web view ( most of them windowless and handled completely by chrome rendering engine and not X11 )

sidorares commented 6 years ago

have a look at https://github.com/ElessarWebb/positron-bar

polpo commented 6 years ago

If you want full control over the native application you want to integrate, want a fully seamless look, and want things like no window decorations around the native app and perfect window dragging in unison, you’ll want your Electron app to act as a window manager, and run both apps inside a Xephyr or xf86-video-nested window.

monok-o commented 6 years ago

exactly, currently I'm trying to do a desktop environment with electron and I want to integrate a custom window manager that can display a linux application in HTML content For the development I use Xhephyr

polpo commented 6 years ago

Check out the window manager examples in this repo's README as a starting point. That and the Xlib manual should be enough to get started. This is definitely possible with node-x11; at a previous job I've done it (unfortunately not open sourced).

nasOS-official commented 1 year ago

ssh-x-forwarding?