# Ubuntu 22 xrdp ```bash $ sudo apt update $ sudo apt install ubuntu-desktop $ sudo systemctl enable --now xrdp $ sudo apt install xrdp $ sudo adduser xrdp ssl-cert $ sudo systemctl restart xrdp $ sudo ufw allow 3389 $ sudo ufw reload ``` ### 錯誤排查 ```bash $ cat ~/.xsession-errors ``` ### 遇到登入黑畫面 `$ sudo vim /etc/xrdp/startwm.sh` 加上 ```shell unset DBUS_SESSION_BUS_ADDRESS unset XDG_RUNTIME_DIR ``` ```diff test -z "${LC_MESSAGES+x}" || export LC_MESSAGES test -z "${LC_MONETARY+x}" || export LC_MONETARY test -z "${LC_NAME+x}" || export LC_NAME test -z "${LC_NUMERIC+x}" || export LC_NUMERIC test -z "${LC_PAPER+x}" || export LC_PAPER test -z "${LC_TELEPHONE+x}" || export LC_TELEPHONE test -z "${LC_TIME+x}" || export LC_TIME test -z "${LOCPATH+x}" || export LOCPATH fi + unset DBUS_SESSION_BUS_ADDRESS + unset XDG_RUNTIME_DIR if test -r /etc/profile; then . /etc/profile fi ``` `$ sudo systemctl restart xrdp.service`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up