# 步骤 1 - 安装 X11VNC 
sudo apt install x11vnc -y


# 步骤 2 - 配置访问密码
sudo x11vnc -storepasswd /etc/x11vnc.pass 

# 步骤 3 - 创建服务

vim  /etc/systemd/system/x11vnc.service


[Unit]
Description=Auto start x11vnc.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target



# 步骤 4 - 配置防火墙,配置和启动服务

sudo ufw allow 5900
sudo systemctl enable x11vnc.service
sudo systemctl daemon-reload

重启服务器

完成。

相关文章:

  • 2021-05-26
  • 2022-01-17
  • 2021-05-20
  • 2021-10-02
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2021-05-20
猜你喜欢
  • 2021-06-08
  • 2022-12-23
  • 2021-08-30
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案