无法使用远程桌面连接到 Xfce

J. *_*Doe 4 xfce xubuntu xrdp

我在 Ubuntu 20.04 上安装了 xrdp 和 xfce:

sudo apt update && sudo apt upgrade -y

sudo apt install xfce4 xrdp -y

sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp

sudo ufw allow 3389

reboot
Run Code Online (Sandbox Code Playgroud)

现在,当使用“Microsoft Remote Desktop”应用程序时,它会打开大约 0.5 秒(黑色),然后快速关闭,没有任何错误等。

J. *_*Doe 5

如果其他人遇到这个问题,解决方案是:

  1. 编辑/etc/xrdp/startwm.sh

sudo nano /etc/xrdp/startwm.sh

  1. 删除这些行

测试-x /etc/X11/Xsession && exec /etc/X11/Xsession

执行 /bin/sh /etc/X11/Xsession

  1. 相反,请在同一位置键入以下内容:

启动xfce4

  1. 重新启动xrdp

sudo /etc/init.d/xrdp restart