赞
踩
sudo apt update
注意由于已经是桌面版系统,无需安装xubuntu桌面,建议直接安装desktop版本,server版本则建议安装Ubuntu-desktop
sudo apt install lightdm
lightdm
注意在安装选择框选择
sudo apt install xrdp
为了避免出错这里分开写
sudo apt install tightvncserver
sudo systemctl enable xrdp
这里很容易出错和遗漏,最好一步步来,不要遗漏
echo gnome-session > ~/.xsession
sudo nano /etc/xrdp/startwm.sh
在fi下面加入以下代码
gnome-session
. /etc/X11/Xsession
#!/bin/sh # xrdp X session start script (c) 2015, 2017, 2021 mirabilos # published under The MirOS Licence # Rely on /etc/pam.d/xrdp-sesman using pam_env to load both # /etc/environment and /etc/default/locale to initialise the # locale and the user environment properly. if test -r /etc/profile; then . /etc/profile fi gnome-session . /etc/X11/Xsession test -x /etc/X11/Xsession && exec /etc/X11/Xsession exec /bin/sh /etc/X11/Xsession
重启xrdp
sudo systemctl restart xrdp
防火墙是默认开启的,检查防火墙确认打开
sudo ufw status
如果不行可以试试
sudo ufw allow 3389/tcp
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。