0


Ubuntu 22.04远程桌面xrdp打开黑屏

Ubuntu 22.04远程桌面xrdp打开黑屏

  1. 安装xrdp

如果不是root,请自行添加sudo权限

aptinstall xrdp
service xrdp start

安装xrdp以后可以自行选择配置xrdp打开的桌面,有些教程推荐xfce,但在这里仍使用ubuntu-desktop自带的gnome桌面

本文主要内容在于一部分问题的处理解决,具体如下

问题1:黑屏

xrdp连接后平面始终为黑色,打开 /etc/xrdp/startwm.sh 文件

vim /etc/xrdp/startwm.sh

添加两行unset,完成以后可以尝试重连一下,如果还不行,注释两行test和exec,再添加一行 gnome-session,如下图所示

unsetDBUS_SESSION_BUS_ADDRESS# 新增unsetXDG_RUNTIME_DIR# 新增iftest-r /etc/profile;then. /etc/profile
fi#test -x /etc/X11/Xsession && exec /etc/X11/Xsession # 注释#exec /bin/sh /etc/X11/Xsession  # 注释
gnome-session  # 新增

完成后重启xrdp,屏幕可以正常显示画面

service xrdp restart

问题2:Authentication is required to create a color profile

出现这种情况时,gnome桌面频繁要求输入密码,解决方法如下

打开终端,新建一个颜色配置文件

sudovim /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla

将以下内容复制到文件中

[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

重启xrdp,问题解决

service xrdp restart
标签: ubuntu linux 运维

本文转载自: https://blog.csdn.net/taxuebufeng/article/details/141063474
版权归原作者 踏雪捕风 所有, 如有侵权,请联系我们删除。

“Ubuntu 22.04远程桌面xrdp打开黑屏”的评论:

还没有评论