[救救孩子]win10 想用 xrdp 连接上有 gnome 桌面的 Ubuntu

2019-11-11 17:34:16 +08:00
 amiwrong123

win10 是企业版,另一台电脑是 Ubuntu18.04.3 lts (完全安装,有 gnome 桌面),在一个局域网内,win 去 ping Ubuntu 的 ip 能 ping 通。

之前找教程的时候用的百度,发现完全被误导了。因为他们总让我再去装一个 xUbuntu 的新的桌面系统,然而我已经有了 gnome 的桌面系统了啊。 https://blog.csdn.net/qq_25556149/article/details/82216190 https://blog.csdn.net/avinswang/article/details/93601312

上面链接的 Std-Xrdp-Install-0.5.sh 我也试过了,没用。

后面我又把 xUbuntu 卸载了,然后按照 https://blog.csdn.net/qq_25556149/article/details/82216190 里面把所有的 xubuntu-desktop 替换为 gnome-desktop 所以来了一遍,还是不行。

后面我就开始谷歌: 找到这个教程: https://www.hiroom2.com/2018/04/29/ubuntu-1804-xrdp-gnome-en/ 虽然这个看起来很靠谱,但还是不行。

win10 通过 mstsc 的连接选项有这些:

连接失败的信息是这些:

各位大佬有没有好使的办法?我把 Ubuntu 重装了都可以,主要确实对这几个配置文件一知半解,但现在又有点着急。

/etc/xrdp/startwm.sh 配置如下:

#!/bin/sh
# xrdp X session start script (c) 2015, 2017 mirabilos
# published under The MirOS Licence

#fixGDM-by-Griffon
gnome-shell-extension-tool -e ubuntu-appindicators@ubuntu.com
gnome-shell-extension-tool -e ubuntu-dock@ubuntu.com

if [ -f ~/.xrdp-fix-theme.txt ]; then
echo 'no action required'
else
gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'
gsettings set org.gnome.desktop.interface icon-theme 'Humanity'
echo 'check file for xrdp theme fix' >~/.xrdp-fix-theme.txt
fi

if test -r /etc/profile; then
	. /etc/profile
fi

if test -r /etc/default/locale; then
	. /etc/default/locale
	test -z "${LANG+x}" || export LANG
	test -z "${LANGUAGE+x}" || export LANGUAGE
	test -z "${LC_ADDRESS+x}" || export LC_ADDRESS
	test -z "${LC_ALL+x}" || export LC_ALL
	test -z "${LC_COLLATE+x}" || export LC_COLLATE
	test -z "${LC_CTYPE+x}" || export LC_CTYPE
	test -z "${LC_IDENTIFICATION+x}" || export LC_IDENTIFICATION
	test -z "${LC_MEASUREMENT+x}" || export LC_MEASUREMENT
	test -z "${LC_MESSAGES+x}" || export LC_MESSAGES
	test -z "${LC_MONETARY+x}" || export LC_MONETARY
	test -z "${LC_NAME+x}" || export LC_NAME
	test -z "${LC_NUMERIC+x}" || export LC_NUMERIC
	test -z "${LC_PAPER+x}" || export LC_PAPER
	test -z "${LC_TELEPHONE+x}" || export LC_TELEPHONE
	test -z "${LC_TIME+x}" || export LC_TIME
	test -z "${LOCPATH+x}" || export LOCPATH
fi

if test -r /etc/profile; then
	. /etc/profile
fi

gnome-session
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession

/etc/X11/Xsession:

#!/bin/sh
#
# /etc/X11/Xsession
#
# global Xsession file -- used by display managers and xinit (startx)

# $Id: Xsession 967 2005-12-27 07:20:55Z dnusinow $
gnome-session
# 后面省略,就前面加了这一句

/var/log/xrdp.log:

[20191111-17:01:39] [DEBUG] Closed socket 17 (AF_UNIX)
[20191111-17:01:43] [DEBUG] Closed socket 17 (AF_UNIX)
[20191111-17:01:46] [DEBUG] xrdp_wm_log_msg: connection problem, giving up
[20191111-17:01:46] [DEBUG] Closed socket 17 (AF_UNIX)
[20191111-17:01:46] [DEBUG] xrdp_wm_log_msg: some problem
[20191111-17:01:46] [DEBUG] xrdp_mm_module_cleanup
[20191111-17:01:46] [DEBUG] Closed socket 16 (AF_INET6 ::1 port 55640)

/var/log/xrdp-sesman.log:

[20191111-16:58:23] [ERROR] X server for display 10 startup timeout
[20191111-16:58:23] [CORE ] waiting for window manager (pid 1621) to exit
[20191111-16:58:23] [ERROR] X server for display 10 startup timeout
[20191111-16:58:23] [ERROR] another Xserver might already be active on display 10 - see log
[20191111-16:58:23] [DEBUG] aborting connection...
[20191111-16:58:23] [CORE ] window manager (pid 1621) did exit, cleaning up session
[20191111-16:58:23] [INFO ] calling auth_stop_session and auth_end from pid 1620
[20191111-16:58:23] [DEBUG] cleanup_sockets:
[20191111-16:58:23] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdp_chansrv_socket_10
[20191111-16:58:23] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdpapi_10
[20191111-16:58:23] [DEBUG] cleanup_sockets: failed to delete /var/run/xrdp/sockdir/xrdpapi_10
[20191111-16:58:23] [INFO ] ++ terminated session:  username liu, display :10.0, session_pid 1620, ip ::ffff:192.168.68.148:58558 - socket: 12
11111 次点击
所在节点    程序员
50 条回复
Death
2019-11-11 17:49:03 +08:00
xorgxrdp 装了吗?
amiwrong123
2019-11-11 17:57:12 +08:00
@Death
xorg xrdp 这两个都安了,应该都是最新,不过用的源都阿里的源
MaxLi77
2019-11-11 18:15:07 +08:00
我用的是一个叫 vnc viewer 的远程桌面控制
Yanni0507
2019-11-11 18:15:10 +08:00
考虑换个软件吗? nomachine 用着还可以
FLynnCPP
2019-11-11 18:17:31 +08:00
teamview 也可以
amiwrong123
2019-11-11 18:19:51 +08:00
@Death 不好意思,原来这是一个包啊,xorgxrdp 我安了,但好像不行哎
sakura1357
2019-11-11 18:29:35 +08:00
用 vnc 吧,我随手给你搜了一下,https://www.cnblogs.com/xuliangxing/p/7642650.html
wangkun025
2019-11-11 18:31:29 +08:00
这个我试过,类似于玄学,是否成功靠运气
我成功过

这是链接
https://websiteforstudents.com/connect-to-ubuntu-16-04-17-10-18-04-desktop-via-remote-desktop-connection-rdp-with-xrdp/
amiwrong123
2019-11-11 18:45:01 +08:00
@MaxLi77
@sakura1357
这个也是在 ubuntu 上设置好了后,ubuntu 就不需要屏幕了呗(以后就不关机了,哈哈哈)。还有就是可以剪切板分享嘛
HaoyangWei
2019-11-11 19:01:42 +08:00
去这里看看,试下人家写好的脚本: http://c-nergy.be/blog
我 xrdp 连到 18.04.2 上用基本没有大问题
ttgo
2019-11-11 19:06:52 +08:00
😂真特么巧啊,刚才配 xrdp,总是雪花屏,于是来划划水透口气,结果就看到此贴
amiwrong123
2019-11-11 19:10:28 +08:00
@Yanni0507
nomachine,等会我百度看看
amiwrong123
2019-11-11 19:11:08 +08:00
@FLynnCPP
用 teamview 是不是必须保持 Ubuntu 的电脑有屏幕连着啊
amiwrong123
2019-11-11 19:11:51 +08:00
@wangkun025
说实话,你这个帖子我看过刚, [手动笑哭]
amiwrong123
2019-11-11 19:13:09 +08:00
@ttgo
哈哈哈哈,挺巧啊。你这还能雪花屏呢,我这根本就连不上😂
amiwrong123
2019-11-11 19:15:32 +08:00
@HaoyangWei
也就是这个链接呗 http://www.c-nergy.be/products.html

我其实也试过了,等会我重装 Ubuntu 在试试,我就不信了。。。

那除了运行这个脚本外,还需要执行什么命令吗😂
yutou527
2019-11-11 19:16:43 +08:00
为啥不用 vnc
amiwrong123
2019-11-11 19:22:43 +08:00
@yutou527
刚开始就知道 xrdp 可以,然后就开始搜教程,这个 vnc 就是很好用呗
sunnyadamm
2019-11-11 19:25:06 +08:00
连 Linux 一般 vnc
MasterMonkey
2019-11-11 19:33:47 +08:00
NoMachine 性能超级棒!
X2Go 部署方便!

用过不会后悔的:)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/618519

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX