From 046cff332025932eaef2cee2c0f0ad313f495605 Mon Sep 17 00:00:00 2001 From: "lion.chan" Date: Tue, 19 Jul 2022 11:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A0=BC=E5=BC=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lion.chan --- .../Editions/Fedora/Fedora29/VNC_远程桌面.md | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Software/System/Linux/Editions/Fedora/Fedora29/VNC_远程桌面.md b/Software/System/Linux/Editions/Fedora/Fedora29/VNC_远程桌面.md index 1cee59c..817799d 100644 --- a/Software/System/Linux/Editions/Fedora/Fedora29/VNC_远程桌面.md +++ b/Software/System/Linux/Editions/Fedora/Fedora29/VNC_远程桌面.md @@ -4,35 +4,47 @@ VNC 远程 Gnome 环境没有成功,远程 MATE 桌面环境配置倒是非常 ## 安装 - sudo dnf grouplist - sudo dnf groupinstall "MATE 桌面环境" - sudo dnf install tigervnc tigervnc-server +```bash +sudo dnf grouplist +sudo dnf groupinstall "MATE 桌面环境" +sudo dnf install tigervnc tigervnc-server +``` ## 配置 - vncserver :1 - vncserver -kill :1 +```bash +vncserver :1 +vncserver -kill :1 +``` 之后在 ~/.vnc 目录下自动产生 xstartup 文件,修改该文件的最后一行如下 - exec /etc/X11/xinit/xinitrc - exec /usr/bin/mate-session - exec /usr/bin/cinnamon-session +```bash +exec /etc/X11/xinit/xinitrc +exec /usr/bin/mate-session +exec /usr/bin/cinnamon-session +``` ## 防火墙 设置防火墙: - firewall-cmd --add-service=vnc-server --permanent - firewall-cmd --reload +```bash +firewall-cmd --add-service=vnc-server --permanent +firewall-cmd --reload +``` 或临时关闭防火墙: - systemctl stop firewalld.service +```bash +systemctl stop firewalld.service +``` ## 使用 - vncserver :1 -geometry 1920x1080 -depth 24 +```bash +vncserver :1 -geometry 1920x1080 -depth 24 +``` 之后使用 MobaXterm 或 VNC Viewer 连接到 IP:5901 即可。