文章摘要GPT 4投诉123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125Coutrue@CoutrueUOS:~$ sudo -i请输入密码:验证成功root@CoutrueUOS:~# apt install x11vnc正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: libqtermwidget5-0 libutf8proc2 qtermwidget5-data x11-apps x11-session-utils xinit使用'apt autoremove'来卸载它(它们)。将会同时安装下列软件: libtk8.6 tcl tk tk8.6 x11vnc-data xterm建议安装: xfonts-cyrillic下列【新】软件包将被安装: libtk8.6 tcl tk tk8.6 x11vnc x11vnc-data xterm升级了 0 个软件包,新安装了 7 个软件包,要卸载 0 个软件包,有 618 个软件包未被升级。需要下载 2,718 kB 的归档。解压缩后会消耗 7,423 kB 的额外空间。您希望继续执行吗? [Y/n] y # 输入 y获取:1 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 libtk8.6 arm64 8.6.9-2 [728 kB]获取:2 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 tcl arm64 8.6.9+1 [5,636 B]获取:3 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 tk8.6 arm64 8.6.9-2 [72.1 kB]获取:4 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 tk arm64 8.6.9+1 [5,676 B]获取:5 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 x11vnc-data all 0.9.13.2-1+dde [227 kB]获取:6 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 x11vnc arm64 0.9.13.2-1+dde [934 kB]获取:7 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 xterm arm64 344.2-1+security [746 kB]已下载 2,718 kB,耗时 11秒 (253 kB/s)正在选中未选择的软件包 libtk8.6:arm64。(正在读取数据库 ... 系统当前共安装有 253845 个文件和目录。)准备解压 .../0-libtk8.6_8.6.9-2_arm64.deb ...正在解压 libtk8.6:arm64 (8.6.9-2) .../var/cache/apt/archives/libtk8.6_8.6.9-2_arm64.deb正在选中未选择的软件包 tcl。准备解压 .../1-tcl_8.6.9+1_arm64.deb ...正在解压 tcl (8.6.9+1) .../var/cache/apt/archives/tcl_8.6.9+1_arm64.deb正在选中未选择的软件包 tk8.6。准备解压 .../2-tk8.6_8.6.9-2_arm64.deb ...正在解压 tk8.6 (8.6.9-2) .../var/cache/apt/archives/tk8.6_8.6.9-2_arm64.deb正在选中未选择的软件包 tk。准备解压 .../3-tk_8.6.9+1_arm64.deb ...正在解压 tk (8.6.9+1) .../var/cache/apt/archives/tk_8.6.9+1_arm64.deb正在选中未选择的软件包 x11vnc-data。准备解压 .../4-x11vnc-data_0.9.13.2-1+dde_all.deb ...正在解压 x11vnc-data (0.9.13.2-1+dde) .../var/cache/apt/archives/x11vnc-data_0.9.13.2-1+dde_all.deb正在选中未选择的软件包 x11vnc。准备解压 .../5-x11vnc_0.9.13.2-1+dde_arm64.deb ...正在解压 x11vnc (0.9.13.2-1+dde) .../var/cache/apt/archives/x11vnc_0.9.13.2-1+dde_arm64.deb正在选中未选择的软件包 xterm。准备解压 .../6-xterm_344.2-1+security_arm64.deb ...正在解压 xterm (344.2-1+security) .../var/cache/apt/archives/xterm_344.2-1+security_arm64.deb正在设置 libtk8.6:arm64 (8.6.9-2) ...正在设置 x11vnc-data (0.9.13.2-1+dde) ...正在设置 tcl (8.6.9+1) ...正在设置 xterm (344.2-1+security) ...正在设置 tk8.6 (8.6.9-2) ...正在设置 tk (8.6.9+1) ...正在设置 x11vnc (0.9.13.2-1+dde) ...正在处理用于 desktop-file-utils (0.23-4+sign) 的触发器 ...正在处理用于 mime-support (3.62) 的触发器 ...正在处理用于 hicolor-icon-theme (0.17-2+sign) 的触发器 ...正在处理用于 libc-bin (2.28.30-deepin1) 的触发器 ...正在处理用于 man-db (2.8.5-2+d1) 的触发器 ...正在处理用于 bamfdaemon (0.5.4.2-1) 的触发器 ...Rebuilding /usr/share/applications/bamf-2.index...root@CoutrueUOS:~# cd /usr/lib/systemd/system/root@CoutrueUOS:/usr/lib/systemd/system# vim x11vnc.service# x11vnc.service 里面的配置文件应该写[Unit]Description=Star x11vnc at startup.After=multi-user.target[Service]Type=simpleExecStart=x11vnc -nolookup -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -shared -noxdamage -xrandr "resize" -rfbport 5900 -rfbauth /etc/vncpasswdExecStop=/bin/kill ${MAINPID}RemainAfterExit=yes[Install]WantedBy=multi-user.targetroot@CoutrueUOS:/usr/lib/systemd/system# root@CoutrueUOS:/usr/lib/systemd/system# systemctl daemon-reload# 注意 x11vnc -storepasswd 密码 密码存放路径root@CoutrueUOS:/usr/lib/systemd/system# x11vnc -storepasswd OpenTheDoor /etc/vncpasswdstored passwd in file: /etc/vncpasswdroot@CoutrueUOS:/usr/lib/systemd/system# root@CoutrueUOS:/usr/lib/systemd/system# systemctl enable --now x11vncCreated symlink /etc/systemd/system/multi-user.target.wants/x11vnc.service → /lib/systemd/system/x11vnc.service.root@CoutrueUOS:/usr/lib/systemd/system# root@CoutrueUOS:/usr/lib/systemd/system# root@CoutrueUOS:/usr/lib/systemd/system# root@CoutrueUOS:/usr/lib/systemd/system# netstat -ntpl # 查看服务有没有起来Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:30631 0.0.0.0:* LISTEN 810/prlshprint tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 23261/x11vnc tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 907/cupsd tcp6 0 0 :::5900 :::* LISTEN 23261/x11vnc tcp6 0 0 ::1:631 :::* LISTEN 907/cupsd root@CoutrueUOS:/usr/lib/systemd/system# ip a 查看当前机器的IP1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever2: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default qlen 1000 link/tunnel6 :: brd ::3: enp0s5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:1c:42:6b:b7:4b brd ff:ff:ff:ff:ff:ff inet 10.211.55.4/24 brd 10.211.55.255 scope global dynamic noprefixroute enp0s5 valid_lft 1794sec preferred_lft 1794sec inet6 fdb2:2c26:f4e4:0:36bc:50ce:6a33:6046/64 scope global dynamic noprefixroute valid_lft 2590925sec preferred_lft 603725sec inet6 fe80::5677:110f:6ff8:7694/64 scope link noprefixroute valid_lft forever preferred_lft foreverroot@CoutrueUOS:/usr/lib/systemd/system# 到这里,用vnc软件就可以进行远程了,下面成功的图片