From ca97f17636ef0dbeb5d8f88b8cc55c3099537055 Mon Sep 17 00:00:00 2001 From: taynpg Date: Thu, 18 Apr 2024 08:07:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0xrdp=E7=9A=84ubuntu=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux/tool/xrdp/config.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 linux/tool/xrdp/config.txt diff --git a/linux/tool/xrdp/config.txt b/linux/tool/xrdp/config.txt new file mode 100644 index 0000000..87e8375 --- /dev/null +++ b/linux/tool/xrdp/config.txt @@ -0,0 +1,28 @@ +1.安装直接命令行安装就可以了,默认也不需要配置什么。 +2.如果黑屏,检查以下几项: +(1)看看依赖有没有 +sudo apt install xserver-xorg-core +sudo apt install xserver-xorg-input-all +sudo apt install xorgxrdp +(2) +黑屏的其中一种原因是,桌面环境(例如默认的 ubuntu-desktop 或是教程中常用的 xfce4)会阻止同一用户第二个会话(session)的启动 ,也就是说 Server 端已经登录的情况下,xrdp 远程桌面就会黑屏。解决方案是在 /etc/xrdp/startwm.sh 中添加两行内容(通常在test -x /etc/X11/Xsession && exec /etc/X11/Xsession 前) +链接:https://www.zhihu.com/question/404968926/answer/2993457416 +(3)如果有 xrdp 远程桌面与本地桌面体验不一致的问题,可创建 .xsessionrc 作为远程桌面的登录脚本,用于在 xrdp 会话(session)建立之前对远程桌面进行设置, +cat < ~/.xsessionrc +export GNOME_SHELL_SESSION_MODE=ubuntu +export XDG_CURRENT_DESKTOP=ubuntu:GNOME +export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg +EOF +3.关于xrdp登录后提示色彩文件授权需要输入密码,可以创建授权文件后重启 polkit 服务(这个暂时没有遇到) +(1) +# 编辑授权文件 +sudo vim /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla +# 重启 polkit 服务 +sudo systemctl restart polkit.service +(2) 具体文件内容如下 +[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