在Debian系统上配置TigerVNC可参考以下步骤:
sudo apt install tigervnc-standalone-server tigervnc-common
。vncpasswd
,按提示输入并确认密码。~/.vnc/xstartup
文件,根据桌面环境添加相应启动命令,如#!/bin/sh\nunset SESSION_MANAGER\nexec /etc/X11/xinit/xinitrc
(适用于GNOME)。也可编辑/etc/systemd/system/vncserver@.service
文件,设置用户、显示编号、分辨率等参数。vncserver :1
,其中:1
表示显示编号,对应端口为5901。sudo systemctl daemon-reload
,然后sudo systemctl enable vncserver@1.service
。sudo ufw allow 5901/tcp
以允许VNC连接。