wsl2 ubuntu Gnome 桌面


wsl 子系統桌面,網上很多教程,要裝的東西比較多,感覺比較繁瑣,果斷放棄了。今天給大家分享一個簡單的實現。

 

准備工作

WSL 不支持 systemd 而 Gnome 桌面又是基於 systemd,所以先解決這個問題。(參考:https://github.com/DamionGans/ubuntu-wsl2-systemd-script)

sudo apt update
sudo apt install git
git clone https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git
cd ubuntu-wsl2-systemd-script/
bash ubuntu-wsl2-systemd-script.sh
重新啟動子系統,或者重啟電腦也行。

 

開始操作(參考:https://developer.aliyun.com/article/764492)


安裝 Gnome 桌面
sudo apt update
sudo apt install -y ubuntu-desktop

安裝 Xrdp
sudo apt install -y xrdp
sudo systemctl status xrdp

sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp

查看一下配置文件中的端口(默認:3389)
vim /etc/xrdp/xrdp.ini


配置防火牆
sudo ufw allow 3389


遠程桌面連接

 

 

 

優化安裝如下工具

sudo apt install gnome-software
sudo apt install gnome-tweaks
sudo apt install gnome-shell-extensions


后面的,自己慢慢折騰吧。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM