centos7 xrdp安装与连接闪退处理

首先安装桌面环境:

yum groupinstall -y "X Window System" Fonts
yum install -y epel-release
yum install -y gdm mate-desktop mate-control-center mate-terminal mate-settings-daemon caja caja-open-terminal mozo mate-themes mate-screensaver mate-backgrounds pluma
unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
ll /etc/systemd/system/default.target
reboot

安装软件

yum install -y xrdp tigervnc-server

systemctl enable xrdp
systemctl start xrdp

reboot

使用windows rdp连接,连上马上断线,查看日志提示:

[20231110-13:08:23] [INFO ] starting Xvnc session...
[20231110-13:08:23] [INFO ] Starting session: session_pid 3321, display :10.0, width 1440, height 900, bpp 16, client ip ::ffff:192.168.2.1:51618 - socket: 12, user name root
[20231110-13:08:23] [INFO ] [session start] (display 10): calling auth_start_session from pid 3321
[20231110-13:08:23] [ERROR] sesman_data_in: scp_process_msg failed
[20231110-13:08:23] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20231110-13:08:23] [INFO ] Starting X server on display 10: Xvnc :10 -auth .Xauthority -geometry 1440x900 -depth 16 -rfbauth /root/.vnc/sesman_passwd-root@vm:10 -bs -nolisten tcp -localhost -dpi 96
[20231110-13:08:23] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20231110-13:08:23] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20231110-13:08:23] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20231110-13:08:23] [INFO ] Session started successfully for user root on display 10
[20231110-13:08:23] [INFO ] Session in progress on display 10, waiting until the window manager (pid 3322) exits to end the session
[20231110-13:08:23] [INFO ] Starting the xrdp channel server for display 10
[20231110-13:08:23] [INFO ] Starting the default window manager on display 10: /usr/libexec/xrdp/startwm-bash.sh

因为上面使用的是mate环境,所以增加此步骤:(关键)

echo "mate-session" >> ~/.xsession
chmod +x ~/.session

增加上面步骤后,连接正常了!

来源: 小学生分析xrdp登录闪退 - 『编程语言区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

你可能感兴趣的:(linux)