197 字
1 分钟
692 次阅读
Ubuntu20.04 XRDP配置
安装XRDP
sudo apt updatesudo apt install xrdp xserver-xorg-core xserver-xorg-input-all xorgxrdpsudo adduser xrdp ssl-certsudo systemctl restart xrdp配置XRDP
编辑 /etc/xrdp/startwm.sh,在test -x /etc/X11/Xsession && exec /etc/X11/Xsession 前添加以下内容
unset DBUS_SESSION_BUS_ADDRESSunset XDG_RUNTIME_DIR指定桌面环境
echo gnome-session > ~/.xsessioncat <<EOF > ~/.xsessionrcexport GNOME_SHELL_SESSION_MODE=ubuntuexport XDG_CURRENT_DESKTOP=ubuntu:GNOMEexport XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdgEOF输入以下内容以解决登录需要频繁输入密码
sudo tee /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla > /dev/null <<'EOF'[Allow Colord all Users]Identity=unix-user:*Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profileResultAny=noResultInactive=noResultActive=yesEOF
sudo tee /etc/polkit-1/localauthority/50-local.d/46-allow-update-repo.pkla > /dev/null <<'EOF'[Allow Package Management all Users]Identity=unix-user:*Action=org.freedesktop.packagekit.system-sources-refreshResultAny=yesResultInactive=yesResultActive=yesEOF
sudo systemctl restart xrdp登录XRDP
Windows搜索RDP即可

输入主机的IP、用户名、勾选 允许我保存凭据,然后输入密码后即可进入


Ubuntu20.04 XRDP配置
https://nvcc-v.com/2025/10/05/ubuntu-2004-xrdp-setup/ KEEP EXPLORING