windows访问Ubuntu18.04远程桌面/access ubuntu18.04 remote desktop from windows
概述:
看视频教程上,访问ubuntu 21.10的远程桌面,只需要安装xrdp就可以
访问ubuntu 18.04的远程桌面,也只需要安装xrdp和xorgxrdp,然而实际操作的时候远不止如此
整理出需要安装的:
1 2 3 4 | sudo apt install xserver-xorg-core sudo apt install xserver-xorg-input-all sudo apt install xrdp sudo apt install xorgxrdp |
不确定的部分:
sudo apt install ssh sudo apt remove ufw or sudo ufw allow from any to any port 3389 proto tcp
需要修改的配置:
When Xrdp is installed, an SSL certificate key – ssl-cert-snakeoil.key – is placed in the /etc/ssl/private/ folder. We need to add the xrdp user to the ssl-cert group to make the file readable to the user.
1 | sudo adduser xrdp ssl-cert |
当在windows运行远程桌面,访问ubuntu桌面的时候,会不停的有提示框,诸如:
这就需要配置下面两项,让ubuntu的polit(policy kit)允许以下行为:
sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla" <<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-profile; ResultAny=no ResultInactive=no ResultActive=yes EOF
sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/47-allow-networkd.pkla" <<EOF [Allow Network Control all Users] Identity=unix-user:* Action=org.freedesktop.NetworkManager.network-control ResultAny=no ResultInactive=no ResultActive=yes EOF
然后就可以远程访问Ubuntu18.04的桌面了:
参考文献:
xorgxrdp install issue:
https://c-nergy.be/blog/?p=13390
polkit configure:
https://askubuntu.com/questions/1355066/i-want-my-network-connections-immutable-instead-of-getting-system-policy-preve
adduser:
https://www.tecmint.com/install-xrdp-on-ubuntu/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具