sudo apt install xrdp
sudo systemctl enable –now xrdp
sudo ufw allow from any to any port 3389 proto tcp
Якщо при підключенні чорний екран, редагуємо:
/etc/xrdp/startwm.sh
Добавляємо в файл:
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
Сюди:
if test -r /etc/profile; then
. /etc/profile
fi
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
if test -r /etc/default/locale; then
. /etc/default/locale
test -z "${LANG+x}" || export LANG
reboot