當你需要輕量版的伺服器版本,但又有些服務必須有GUI。那可以選擇server+輕量gui vnc來作為替代方案。
安裝
sudo apt-get update
sudo apt install -y gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal ubuntu-desktop
sudo apt-get install tightvncserver
vncserver
sudo cp ~/.vnc/xstartup ~/.vnc/xstartup.bak
sudo nano ~/.vnc/xstartup
內容:
#!/bin/sh
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
export XDG_MENU_PREFIX="gnome-flashback-"
gnome-session --session=gnome-flashback-metacity --disable-acceleration-check &
確保關閉已經啟動的服務:
vncserver -kill :1
啟動一個新服務:
vncserver -geometry 1920x1080 :1
VNC連線:
輸入連線資訊:
ip:5901(可以自行變更)
Ref:
https://samwhelp.github.io/note-about-ubuntu/read/desktop_environment/gnome-shell/adjustment/switch-input-source.html