HTML5/javascript X11 服务器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19556947/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 15:58:07  来源:igfitidea点击:

HTML5/javascript X11 server?

javascriptlinuxhtmlx11

提问by bpeikes

We have an application which consumes a large amount of data. Currently a desktop app, but we would like to deliver it via the browser.

我们有一个消耗大量数据的应用程序。目前是一个桌面应用程序,但我们希望通过浏览器提供它。

It doesn't make sense to me to create a web app where we need to transfer a ll the data used for the visualizations.

创建一个 Web 应用程序对我来说没有意义,我们需要在其中传输用于可视化的所有数据。

We're looking at RDP and some products out there that provide RDP access via a fully javascript client. They seem to work well with our app, but I've been thinking about what it would take to move off Windows.

我们正在研究 RDP 和一些通过完全 JavaScript 客户端提供 RDP 访问的产品。它们似乎与我们的应用程序配合得很好,但我一直在考虑离开 Windows 需要什么。

Switching the front end so that it could run under Linux would not be trivial, but not impossible, so the main stumbling block would be delivery.

切换前端使其可以在 Linux 下运行并非微不足道,但并非不可能,因此主要的绊脚石将是交付。

I was wondering if there are any X11 javascript servers out there, but have not found any leads.

我想知道是否有任何 X11 javascript 服务器,但没有找到任何线索。

回答by totaam

Use xpra's builtin html5 client, it supports any application you can run on an X11 desktop.

使用 xpra 的内置html5 客户端,它支持您可以在 X11 桌面上运行的任何应用程序。

回答by Basile Starynkevitch

AFAIK, recent GTKhas been ported to HTML5+Javascript in Gtk Broadway

AFAIK,最近的GTK已在Gtk Broadway 中移植到 HTML5+Javascript

And you could make your application a web application, for instance by using Wt, or by making it an HTTP server thru specialized HTTP server libraries like libonion, libmicrohttpdetc.

并且您可以使您的应用程序成为 Web 应用程序,例如使用Wt,或者通过专门的 HTTP 服务器库(如libonionlibmicrohttpd等)将其设为HTTP 服务器。

By using AJAXtechniques (e.g. thru jquery) your application won't transmit all the display data to the browser at once (but only incrementally and only the actually shown data).

通过使用AJAX技术(例如通过jquery),您的应用程序不会一次将所有显示数据传输到浏览器(但只会增量传输并且仅传输实际显示的数据)。

You might also consider fastcgias a way to connect your application to some web server.

您也可以考虑将fastcgi作为将您的应用程序连接到某个 Web 服务器的一种方式。

回答by SheetJS

You can use an HTML5 VNC viewer like https://github.com/kanaka/noVNCcoupled with a VNC server like RealVNC

您可以将 HTML5 VNC 查看器(如https://github.com/kanaka/noVNC)与 VNC 服务器(如RealVNC)结合使用

回答by Andrey Sidorov

I know two, both at very infancy:

我知道两个,都在婴儿期:

https://github.com/GothAck/javascript-x-server

https://github.com/GothAck/javascript-x-server

and

https://github.com/ttaubert/x-server-js

https://github.com/ttaubert/x-server-js

Both need simple tcp-to-websockets proxy in front, but all X11 logic happen inside web page and all x11 objects exist and interact within browser (so it's not just remote framebuffer but real server)

两者都需要前面的简单 tcp-to-websockets 代理,但所有 X11 逻辑都发生在网页内部,并且所有 x11 对象都存在并在浏览器中进行交互(所以它不仅仅是远程帧缓冲区,而是真正的服务器)

回答by nintyfan

For very simple applications you can use libgreattao toolkit and tao-network-client to connect to it. I'm the author of both project. The API isn't yet frozen, but it rather behaves stable. You can read about it here: https://nintyfan.wordpress.com/2015/04/30/server-buildin-into-libgreattao-and-tao-network-client/

对于非常简单的应用程序,您可以使用 libgreattao 工具包和 tao-network-client 连接到它。我是这两个项目的作者。API 尚未冻结,但它的行为相当稳定。你可以在这里阅读:https: //nintyfan.wordpress.com/2015/04/30/server-buildin-into-libgreattao-and-tao-network-client/

It can provide some problems with applications with a lot of data, because all elements must be send to client, when it were created, but instead we don't send full graphics(only icons is send) and user interface could be changed quickly. It also don't support mouse enter/leave/move events.

它可以为具有大量数据的应用程序提供一些问题,因为所有元素必须在创建时发送到客户端,但我们不发送完整图形(仅发送图标)并且用户界面可以快速更改。它也不支持鼠标进入/离开/移动事件。

I must tell: do not download tarbar, but download version from svn.

我必须告诉:不要下载 tarbar,而是从 svn 下载版本。

回答by jo-erlend

Sounds like the easiest approach for you is to get xrdp, which is an RDP-server for X. Then you would use your RDP client to connect to it. I think Nomachine NX supports html directly now, but I'm not sure. There was talk of an html X2go-client, but I don't know anything about that either.

听起来对您来说最简单的方法是获取 xrdp,它是 X 的 RDP 服务器。然后您将使用 RDP 客户端连接到它。我认为 Nomachine NX 现在直接支持 html,但我不确定。有关于 html X2go-client 的讨论,但我对此一无所知。

回答by nintyfan

You can ever run full Linux distribution in Web Browser, but that's require to run x86/ARM emulator and GNU/Linux inside it. It provides X server with possible web connection too.

您可以在 Web 浏览器中运行完整的 Linux 发行版,但这需要在其中运行 x86/ARM 模拟器和 GNU/Linux。它也为 X 服务器提供了可能的网络连接。