[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没啥差别。

相关推荐
FIT2CLOUD飞致云1 小时前
支持Hermes Agent与MongoDB管理,1Panel v2.1.9版本发布
ai·开源·1panel
小政同学1 小时前
【NFS故障】共享的文件无法执行
linux·运维·服务器
Cyeam2 小时前
Roadbook CSV:一行 CSV 秒变高德地图路书
后端·开源·aigc
AI木马人2 小时前
3.【Prompt工程实战】如何设计一个可复用的Prompt系统?(避免每次手写提示词)
linux·服务器·人工智能·深度学习·prompt
ch3nyuyu2 小时前
Ubuntu(乌班图)基础指令
linux·运维·网络
minglie12 小时前
gcc编译器汇总
linux
挽安学长2 小时前
保姆级教程,通过GACCode使用Claude Code Desktop!
运维·服务器
firstacui3 小时前
MGRE实验
运维·服务器·网络
白菜欣4 小时前
Linux —《开发三件套:gcc/g++、gdb、make/Makefile 全解析》
linux·运维
何中应4 小时前
Grafana如何给列表设置别名
运维·grafana·监控