2019-11-11 15:18:55 +08:00
|
|
|
# Manjaro 安装图形界面及开启 VNC
|
|
|
|
|
2019-11-12 17:28:12 +08:00
|
|
|
## 安装 Xorg 和 lightDM
|
2019-11-11 15:18:55 +08:00
|
|
|
|
|
|
|
```sh
|
2019-11-12 17:28:12 +08:00
|
|
|
pacman -S xorg xorg-xinit lightdm lightdm-gtk-greeter
|
|
|
|
```
|
|
|
|
|
|
|
|
## 安装 xfce4 或 cinnamon
|
|
|
|
|
|
|
|
```sh
|
|
|
|
pacman -S xfce4 xfce4-goodies
|
|
|
|
# 或
|
|
|
|
pacman -S cinnamon
|
2019-11-11 15:18:55 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
## 使能 lightDM 登陆管理器
|
|
|
|
|
|
|
|
```sh
|
|
|
|
systemctl enable lightdm.service
|
|
|
|
```
|
|
|
|
|
2019-11-12 17:28:12 +08:00
|
|
|
## 安装和开启 tigervnc
|
|
|
|
|
|
|
|
```sh
|
|
|
|
pacman -S tigervnc
|
|
|
|
vncserver
|
|
|
|
```
|
|
|
|
|
|
|
|
第一次使用需要按提示输入密码,开启后会提示一个 \<num\> 号。如果要关闭 vnc 可使用如下命令:
|
2019-11-11 15:18:55 +08:00
|
|
|
|
|
|
|
```sh
|
2019-11-12 17:28:12 +08:00
|
|
|
vncserver -kill :<num>
|
|
|
|
```
|
|
|
|
|
|
|
|
## 配置 VNC
|
|
|
|
|
|
|
|
修改 ~/.vnc/xstartup 文件如下:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
unset SESSION_MANAGER
|
|
|
|
unset DBUS_SESSION_BUS_ADDRESS
|
|
|
|
#exec dbus-launch cinnamon-session
|
|
|
|
exec dbus-launch xfce4-session
|
|
|
|
|
|
|
|
#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
|
|
|
|
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
|
|
|
|
#xsetroot -solid grey
|
|
|
|
#vncconfig -iconic &
|
|
|
|
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
|
|
|
|
#x-window-manager &
|
|
|
|
#gnome-session &
|
|
|
|
#xfce4-terminal &
|
|
|
|
#sesion-manager & xfdesktop & xfce4-panel &
|
|
|
|
#xfce4-menu-plugin &
|
|
|
|
#xfsettingsd &
|
|
|
|
#xfconfd &
|
|
|
|
#xfwm4 &
|
2019-11-11 15:18:55 +08:00
|
|
|
```
|