修正格式.

Signed-off-by: lion.chan <cy187lion@sina.com>
This commit is contained in:
lion.chan 2022-07-19 11:16:34 +08:00
parent e4f1ddd114
commit 046cff3320
1 changed files with 24 additions and 12 deletions

View File

@ -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 即可。