1. 安装 xrdp
sudo apt install xubuntu-desktop
sudo apt install xrdp
2. 修改配置
1. 创建并添加
echo 'xfce4-session' >> ~/.xsession
# 解决远程登录黑屏问题
sudo vim /etc/xrdp/startwm.sh
2. 解决黑屏问题
sudo vim /etc/xrdp/startwm.sh
#添加以下内容 在 X11/Xsession前面
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
3. 重启远程桌面服务
sudo systemctl restart xrdp
4. 解决远程登录提示各种授权问题
chmod +rx /etc/polkit-1/localauthority
编辑并添加:sudo vim /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
编辑并添加:/etc/polkit-1/localauthority/50-local.d/46-allow-packagekit.pkla
[Allow Refresh Repository all Users]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=no
ResultInactive=no
ResultActive=yes
此方法不使用 windows上安装ubuntu子系统,ubuntu子系统的还在研究,待后续。
(304)