3.vnc服务配置(仅ubuntu+xfce版本可以使用)
若想配置开机自启动vnc服务,请自行百度配置,本文档不提供支持
3.1 开发板安装vnc服务
ssh连接开发板,打开终端,更新包列表
sudo apt update
安装TightVNC服务
sudo apt install tightvncserver
VNC服务器的初始配置,可以使用vncserver命令设置安全密码并创建初始配置文件
vncserver
系统会提示您输入并验证密码,以便远程访问您的计算机
You will require a password to access your desktops
Password:
Warning: password truncated to the length of 8
Verify:
根据需求设置view-only密码,比如远程共享屏幕,不可操作,可以选择y或者n
Would you like to enter a view-only password (y/n)? y
Password:
Warning: password truncated to the length of 8.
Verify:
New 'X' desktop is ubuntu:1
Creating default startup script /home/zcwyou/.vnc/xstartup
Starting applications specified in /home/zcwyou/.vnc/xstartup
Log file is /home/zcwyou/.vnc/ubuntu:1.log
注意:VNC密码长度必须在6到8个字符之间
配置VNC服务器,首先使用以下命令停止运行在端口5901上的VNC服务器实例
vncserver -kill :1
在修改xstartup文件之前,先备份原始文件
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
现在创建一个新的xstartup文件,并在您的文本编辑器中打开它
vim ~/.vnc/xstartup
#添加以下内容
#!/bin/bash
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &
授权
chmod +x ~/.vnc/xstartup
重启服务
vncserver
3.2 Windows安装vnc viewer
下载 vnc viewer
链接:https://pan.baidu.com/s/1PV4p0sCeRNDzxlWUAQUekw?pwd=YZJS
提取码:YZJS
下载后双击打开
点击finish,完成安装
3.3 验证远程,使用vnc客户端测试,IP:5901
作者:lzx 创建时间:2025-02-07 17:00
最后编辑:lzx 更新时间:2025-04-16 11:40
最后编辑:lzx 更新时间:2025-04-16 11:40