62 lines
1.1 KiB
Markdown
62 lines
1.1 KiB
Markdown
# Manjaro 安装图形界面及开启 VNC
|
|
|
|
## 安装 Xorg 和 lightDM
|
|
|
|
```sh
|
|
pacman -S xorg xorg-xinit lightdm lightdm-gtk-greeter
|
|
```
|
|
|
|
## 安装 xfce4 或 cinnamon
|
|
|
|
```sh
|
|
pacman -S xfce4 xfce4-goodies
|
|
# 或
|
|
pacman -S cinnamon
|
|
```
|
|
|
|
## 使能 lightDM 登陆管理器
|
|
|
|
```sh
|
|
systemctl enable lightdm.service
|
|
```
|
|
|
|
## 安装和开启 tigervnc
|
|
|
|
```sh
|
|
pacman -S tigervnc
|
|
vncserver
|
|
```
|
|
|
|
第一次使用需要按提示输入密码,开启后会提示一个 \<num\> 号。如果要关闭 vnc 可使用如下命令:
|
|
|
|
```sh
|
|
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 &
|
|
```
|