远程桌面 - RDP 在断开连接后出现空白屏幕并中止

注意:我浏览了很多问题,没有找到答案,请不要标记为重复!已经有一个类似的问题在这里,但可惜没有收到任何答案。
我正在尝试从我的Windows 10电脑连接到我的Odroid XU4,在连接成功建立后(至少我认为是这样),我的Windows电脑屏幕会变成灰色几秒钟,然后消失,没有任何错误信息。我在我的Linux机器上安装了"xrdp"。以下是3个步骤:
插入凭据: enter image description here 建立连接: enter image description here 空白屏幕,在静默中断之前: enter image description here ##中断##
编辑 这是系统日志输出:
Oct  3 08:25:18 odroid systemd[1]: Starting Session c4 of user odroid.
Oct  3 08:25:19 odroid org.a11y.Bus[2241]: Activating service name='org.a11y.atspi.Registry'
Oct  3 08:25:19 odroid org.a11y.Bus[2241]: Successfully activated service 'org.a11y.atspi.Registry'
Oct  3 08:25:19 odroid org.a11y.atspi.Registry[2283]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Oct  3 08:25:19 odroid gnome-session[2197]: gnome-session-is-accelerated: No composite extension.
Oct  3 08:25:19 odroid gnome-session[2197]: gnome-session-check-accelerated: Helper exited with code 256
Oct  3 08:25:24 odroid gnome-session[2197]: gnome-session-is-accelerated: No composite extension.
Oct  3 08:25:24 odroid gnome-session[2197]: gnome-session-check-accelerated: Helper exited with code 256
Oct  3 08:25:24 odroid gnome-session[2197]: x-session-manager[2197]: WARNING: software acceleration check failed: Child process exited with code 1
Oct  3 08:25:24 odroid x-session-manager[2197]: WARNING: software acceleration check failed: Child process exited with code 1
Oct  3 08:25:24 odroid x-session-manager[2197]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Oct  3 08:25:24 odroid gnome-session[2197]: x-session-manager[2197]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Oct  3 08:25:24 odroid org.a11y.atspi.Registry[2283]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":10.0"
Oct  3 08:25:24 odroid org.a11y.atspi.Registry[2283]: after 11 requests (11 known processed) with 0 events remaining.
Oct  3 08:25:24 odroid org.gtk.vfs.Daemon[2241]: A connection to the bus can't be made
Oct  3 08:25:24 odroid org.gtk.vfs.Daemon[2241]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
Oct  3 08:25:24 odroid org.a11y.Bus[2241]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.

你有检查日志看看xrdp是否对某些事情感到不满吗?我通常通过ssh登录到一个终端,然后从该终端运行我的rdp服务器,然后rdp进去并观察终端输出,看看rdp是否有任何抱怨。如果一开始没有看到任何有用的信息,尝试以更详细的模式运行xrdp,并检查syslog(/var/log/syslog)。 - sibaz
@sibaz我将syslog输出放入问题中。你能猜出这是什么意思吗?软件加速进程停止了吗?你认为这个问题可能与无效的端口有关吗?我可以远程登录一切正常,但之后系统崩溃了。 - codepleb
请参阅http://askubuntu.com/a/453868/428973 - o9000
嗯,x-session-manager遇到故障,可能是由于软件加速检查失败,可能是因为您的硬件正在使用硬件加速,并且xrdp不知道如何在软件中模拟它(这只是一个猜测)。o9000的评论暗示xrdp不能与Unity或Gnome一起使用,这似乎很奇怪,但如果是真的,那可能就是您的问题。我建议您尝试使用其他VNC客户端或尝试使用其他窗口管理器。我使用KDE(和kdrc/krfb),但它并不小。 - sibaz
4个回答

我找到了解决办法,在终端中输入这行代码后,它就起作用了:
echo mate-session> ~/.xsession

如果这个方法对你没有帮助,可以尝试以下命令:
sudo apt-get install mate-core

我不确定,但我使用的是Hardkernel的预编译修改版Ubuntu。桌面环境是Mate,但我能够“全新地”安装mate-core,而不仅仅是更新现有的安装。也许这是问题所在。

RDP不是在端口3389上吗?你在做端口转发吗? - j0h
@j0h:是的,我进行了端口转发。当然,只有在你需要从本地网络外部访问时才需要这样做。 - codepleb
mate-session出现错误:(mate-session:11853):警告:无法打开显示器。 - stiv
噢:不要使用根帐户通过RDP来访问计算机,创建一个新的帐户并使用它来调用mate-session。 - stiv

解决方案: 输入以下命令:
sudo sed -i '/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config

另一个选择是尝试使用Parallels客户端:
获取和安装的说明可以在这里找到: http://kb.parallels.com/en/123304 (他们提供了一个.deb软件包,让你的生活更轻松。 :) )

你所看到的是由于GNOME 3中的这个漏洞引起的。您可以使用其他桌面环境,如KDE。

1这个问题可以在使用KDE时重现。 - clobrano