Kali Linux 使用远程桌面连接——xrdp&xfce_kali xfce桌面-CSDN博客
Ubuntu/Debian/Kali xrdp远程桌面黑屏/空屏/无画面解决办法 - 知乎 (zhihu.com)
sudo apt-get install xrdp -y
sudo apt-get install xfce4 -ysudo systemctl enable xrdp --now
systemctl status xrdp
cat /etc/xrdp/startwm.sh
#!/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
fiif test -r ~/.profile; then. ~/.profile
fi
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
. $HOME/.profile
echo "xfce4-session" >~/.xsession
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
下面这几行需要添加,不添加有可能会闪退
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
. $HOME/.profile
echo "xfce4-session" >~/.xsession