[Linux]Ubuntu noVNC使用

又到了逛大型程序员交友 网站的时间了,今天你准备好了吗。

今天要推荐的一个有趣的项目是noVNC

setup好以后是这个样子的,可以在浏览器登陆vnc,不需要再安装一个vnc client.

setup的过程比较简单,分为以下几步:

1. vncserver

novnc基于vncserver,所以需要先把vncserver的环境搭建好,最后的目标就是在命令行敲vncserver的时候他会提示在:1或者:5901创建成功。

shell 复制代码
sudo apt-get install tightvncserver

这里不展开,网上有大量的教程。

这里要注意记住设置的vncserver的password,下面会用到。

2. novnc

Use the novnc_proxy script to automatically download and start websockify, which includes a mini-webserver and the WebSockets proxy. The --vnc option is used to specify the location of a running VNC server:

shell 复制代码
git clone https://github.com/novnc/noVNC.git
cd noVNC
./utils/novnc_proxy --vnc localhost:5901 --listen localhost:6081

这时你应该可以看到这样的输出:

复制代码
Using local websockify at /home/xxx/projects/noVNC/utils/websockify/run
Starting webserver and WebSockets proxy on host localhost port 6081
WebSocket server settings:
  - Listen on localhost:6081
  - Web server. Web root: /home/xxx/projects/noVNC
  - SSL/TLS support
  - proxying from localhost:6081 to localhost:5901


Navigate to this URL:

    http://localhost:6081/vnc.html?host=localhost&port=6081

Press Ctrl-C to exit

这时,把上面那个URL copy到浏览器里打开然后点connect输入你的vncserver密码就可以了,实际用下来和vnc client没啥差别。

相关推荐
wdfk_prog2 小时前
嵌入式面试真题第 10 题:高优化等级下共享状态可见性、内存模型与系统级同步设计
java·linux·开发语言·面试·职场和发展·架构·c
x-cmd3 小时前
Mac 涨价后,本地 AI 还能千元入门吗?
linux·人工智能·macos·ai·agent·amd·本地ai入门
wangruofeng3 小时前
8 小时 10000 星,xAI 把内部编码 Agent 开源了:Grok Build 的架构拆解
开源·github·aigc
冬奇Lab5 小时前
每日一个开源项目(第160篇):Destructive Command Guard - 在 AI Agent 运行 rm -rf 之前拦截它
人工智能·安全·开源
AOwhisky6 小时前
下一代容器来了?Docker 宣布原生支持 WebAssembly
java·运维·docker·容器·rust·wasm
不羁的木木9 小时前
HarmonyOS APP实战-基于Image Kit的图像处理APP - 第9篇:批量处理与编辑历史
图像处理·ubuntu·harmonyos
字节跳动开源9 小时前
扣子✖️ SearchCLI:一个不会英语的卖家,靠一个 bot 卖到了日韩英多个市场
数据挖掘·开源·agent
春卷同学10 小时前
HarmonyOS掌上记账APP开发实践第15篇:ArkTS 类型系统深度解析 — 从接口到联合类型的灵活运用
ubuntu·华为·harmonyos
摇滚侠10 小时前
Linux 零基础教程 09、11、77
linux·运维·服务器