遠端桌面 - jenhaoyang/backend_blog GitHub Wiki
sudo apt update && sudo apt upgrade
apt install tasksel -y
tasksel
選擇Ubuntu desktop
systemctl set-default graphical.target
重新開機
sudo apt install xrdp -y
sudo systemctl status xrdp
sudo usermod -a -G ssl-cert xrdp
解決黑屏
sudo nano /etc/xrdp/startwm.sh
增加下面兩列
Unset DBUS_SESSION_ADDRESS
Unset XDG_RUNTIME_DIR
重啟服務
sudo systemctl restart xrdp
sudo ufw allow from 192.168.1.0/24 to any port 3389
sudo ufw reload
參考:
https://tecadmin.net/how-to-install-xrdp-on-ubuntu-20-04/