我在 XRDP 中遇到了一个问题,输入正确的用户名密码后会话立即终止。我在论坛上看到过很多次这种问题,但没有任何解决方案能起到作用。您能建议一些后续步骤吗?
这是 xrdp.log
[20210116-16:01:40] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.4 port 54568
[20210116-16:01:40] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.47 port 3389)
[20210116-16:01:40] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20210116-16:01:40] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20210116-16:01:40] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20210116-16:01:40] [DEBUG] TLSv1.3 enabled
[20210116-16:01:40] [DEBUG] TLSv1.2 enabled
[20210116-16:01:40] [DEBUG] Security layer: requested 11, selected 1
[20210116-16:01:50] [INFO ] connected client computer name: abhsha-m-23zs
[20210116-16:01:50] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20210116-16:01:50] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20210116-16:01:50] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20210116-16:01:50] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20210116-16:01:50] [INFO ] TLS connection established from ::ffff:192.168.1.4 port 54568: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384
[20210116-16:01:50] [DEBUG] xrdp_000005c9_wm_login_mode_event_00000001
[20210116-16:01:50] [INFO ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20210116-16:01:50] [INFO ] Cannot find keymap file /etc/xrdp/km-00000000.ini
[20210116-16:01:50] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20210116-16:01:50] [WARN ] local keymap file for 0x00000000 found and doesn't match built in keymap, using local keymap file
[20210116-16:01:50] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20210116-16:01:50] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20210116-16:01:50] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20210116-16:01:50] [DEBUG] return value from xrdp_mm_connect 0
[20210116-16:01:50] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20210116-16:01:50] [DEBUG] xrdp_wm_log_msg: started connecting
[20210116-16:01:50] [INFO ] lib_mod_log_peer: xrdp_pid=1481 connected to X11rdp_pid=1484 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:192.168.1.4 client_port=54568
[20210116-16:01:50] [DEBUG] xrdp_wm_log_msg: connected ok
[20210116-16:01:50] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20210116-16:01:50] [DEBUG] Closed socket 18 (AF_INET6 ::1 port 41282)
[20210116-16:01:51] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.47 port 3389)
[20210116-16:01:51] [DEBUG] xrdp_mm_module_cleanup
[20210116-16:01:51] [DEBUG] Closed socket 19 (AF_UNIX)
[20210116-16:01:51] [DEBUG] Closed socket 20 (AF_UNIX)
这是 xrdp-sesman.log
[20210116-16:01:50] [INFO ] A connection received from ::1 port 41282
[20210116-16:01:50] [INFO ] ++ created session (access granted): username kali, ip ::ffff:192.168.1.4:54568 - socket: 12
[20210116-16:01:50] [INFO ] starting Xorg session...
[20210116-16:01:50] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20210116-16:01:50] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
[20210116-16:01:50] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
[20210116-16:01:50] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20210116-16:01:50] [INFO ] calling auth_start_session from pid 1482
[20210116-16:01:50] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20210116-16:01:50] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20210116-16:01:50] [INFO ] /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20210116-16:01:50] [CORE ] waiting for window manager (pid 1483) to exit
[20210116-16:01:51] [CORE ] window manager (pid 1483) did exit, cleaning up session
[20210116-16:01:51] [INFO ] calling auth_stop_session and auth_end from pid 1482
[20210116-16:01:51] [DEBUG] cleanup_sockets:
[20210116-16:01:51] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10
[20210116-16:01:51] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_10
[20210116-16:01:51] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdpapi_10
[20210116-16:01:51] [INFO ] ++ terminated session: username kali, display :10.0, session_pid 1482, ip ::ffff:192.168.1.4:54568 - socket: 12
我尝试了以下方法:
- 防火墙允许端口 3389
xfce4-session
我在 /etc/.xsession 上添加了以下内容- 我也曾尝试注释掉以下几行
startwm.sh
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
- 已安装 tigervnc 软件包
- 冉
sudo adduser xrdp ssl-cert
- 每次都重新启动服务
尽管如此,我还是无法让 XRDP 工作。
答案1
根据您对问题的描述,这可能是因为您已经登录到 Ubuntu,并且正在尝试使用相同的用户帐户建立远程桌面连接。
无法(使用 xRDP 软件)在本地 Ubuntu 上使用相同的用户帐户并同时登录并执行远程连接...
要评估这是否是问题所在,请确保执行远程连接的用户帐户尚未登录到你的 Ubuntu 机器上....
希望这能有所帮助,下次见
答案2
供以后参考,我遇到了同样的问题,没有深入研究为什么会发生这种情况,我只是安装了另一个桌面环境(xfce4),它运行良好。这似乎是 GNOME 的问题。
安装:
sudo apt install xfce4
然后切换到它:
sudo update-alternatives --config x-session-manager
答案3
我遇到了同样的问题,但我在一台 2009 年中期的旧 MacBook Pro 上运行 Ubuntu 18.04 LTS,并且我进入了“软件和更新”、“附加驱动程序”选项卡,并将默认图形驱动程序从 X.Org X 服务器更改为专有的 NVIDIA 二进制驱动程序。一旦我将其改回更普通的 X.Org X 服务器,它就允许我通过 XRDP 登录,而无需在之后断开连接。