我可以从我的网页上启动Google Chrome webapp的VNC Viewer吗? [英] Can I launch VNC Viewer for Google Chrome webapp from my web page?
问题描述
我正在构建一个Web服务,使VNC连接到远程机器。目前我正在使用一个名为novnc的项目将VNC嵌入到我的网页中的一个元素中。但是,它非常慢,特别是Web浏览器,eclipse等。
当我尝试由novnc发布的Google Chrome webapp的VNC查看器时,它看起来非常快。这可能是因为它运行的本机(本地VNC客户端也非常活跃)。
我想知道我是否可以让我的用户安装Real VNC webapp,但随后使用我指定的参数(主机,端口等)从我的网页调用它?
基本上,我的网页负责管理这些虚拟机(保存,创建,克隆等),我希望快速实现VNC,我可以从浏览器内部(从我的网页)调用VNC。从我研究过的不同类型的应用程序看,这个Web应用程序看起来是最快的,但我不知道是否/如何用我给出的参数调用它。
这段代码来自 http://rogierg.blogspot.com/2007/03/run-vnc-and-rdp-from-hyperlinks.html 可能对您有所帮助。
编辑以下文本以指向您的VNC并保存为
C:\ Windows \VNC.js:
blockquote>
var destination =(WScript.Arguments(0))
var search ='vnc://'
//修改VNC查看器的路径!
var vncexe ='D:\\Apps\\VNC\\vncviewer.exe'
//WScript.Echo(目的地)
destination = destination.replace(搜索'')
destination = destination.replace('/','')
var ws = new ActiveXObject(WScript.Shell)
//WScript.Echo(vncexe + +目的地)
ws.Exec(vncexe ++ destination)
将下一段文字保存为VNC.reg并双击: > Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT \vc]
@ =URL:VNC Connection
URL Protocol=
[HKEY_CLASSES_ROOT\vnc\ DefaultIcon]
@ =C:\\WINDOWS\\System32\\mstsc.exe
[HKEY_CLASSES_ROOT\vnc\shell]
[HKEY_CLASSES_ROOT\ vnc\shell\open】
[HKEY_CLASSES_ROOT\vnc\shell\open\command]
@ =wscript.exe C:\\WINDOWS\\vn c.js%1
I am building a web service that gives VNC connections to remote machines. Currently I am using a project called novnc to embed the VNC inside a element in my web page. However, it is very slow, especially web browsers, eclipse etc. When I tried the VNC Viewer for Google Chrome webapp released by novnc, however, it seems really fast. This might be because its running native (native VNC clients are also very snappy). I was wondering whether I can have my users install the Real VNC webapp, but then invoke it from my webpage with the parameters (host, port etc) that I have specified? Basically, my webpage takes care of the management of these VMs (saving, creating, cloning etc), and I would like a fast implementation of VNC underneath which I can call from inside the browser (from my webpage). From the different ones I've looked into, this web app seems the fastest, but I don't know if/how I can invoke it with my given params.
解决方案This bit of code from http://rogierg.blogspot.com/2007/03/run-vnc-and-rdp-from-hyperlinks.html may be helpful to you.
edit the following text to point to your VNC and save as C:\Windows\VNC.js:
var destination=(WScript.Arguments(0)) var search='vnc://' //Modify the path to VNC Viewer! var vncexe='D:\\Apps\\VNC\\vncviewer.exe' //WScript.Echo(destination) destination=destination.replace(search, '') destination=destination.replace('/', '') var ws = new ActiveXObject("WScript.Shell") //WScript.Echo(vncexe + " " + destination) ws.Exec(vncexe + " " + destination)
Save the next piece of text as VNC.reg and doubleclick:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\vnc] @="URL:VNC Connection" "URL Protocol"="" [HKEY_CLASSES_ROOT\vnc\DefaultIcon] @="C:\\WINDOWS\\System32\\mstsc.exe" [HKEY_CLASSES_ROOT\vnc\shell] [HKEY_CLASSES_ROOT\vnc\shell\open] [HKEY_CLASSES_ROOT\vnc\shell\open\command] @="wscript.exe C:\\WINDOWS\\vnc.js %1"
这篇关于我可以从我的网页上启动Google Chrome webapp的VNC Viewer吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!