ubuntu24.04lts和Windows11家庭版远程桌面连接若干问题(解决)

xrdg问题自己看文章安装,这里讲一些网上文章解决不了的。太丫的崩溃了,折腾了一天,最后用cursor解决了,还得是claude4.5给力。

问题1:

connecting to sesman on 127.0.0.1:3350sesman connect oksending login info to session manager, Please wait...login failed for user fpga

解决答案:

原本的Ubuntu gnome桌面和xrdp兼容性差,改用xface4。

bash 复制代码
//安装桌面环境
sudo apt install xfce4 xfce4-goodies  
echo xfce4-session >~/.xsession 
//安装完成,重启xrdp
sudo systemctl start xrdp

修改文件:

sudo nano /etc/xrdp/startwm.sh

或者

sudo vim /etc/xrdp/startwm.sh

把下面内容填进去,可以结合自己的修改,备份好原件。

bash 复制代码
#!/bin/sh
# xrdp X session start script (c) 2015, 2017, 2021 mirabilos
# published under The MirOS Licence

# Rely on /etc/pam.d/xrdp-sesman using pam_env to load both
# /etc/environment and /etc/default/locale to initialise the
# locale and the user environment properly.
unset  DBUS_SESSION_BUS_ADDRESS
unset  XDG_RUNTIME_DIR

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

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

# 优先使用用户自定义的 ~/.xsession
if [ -r ~/.xsession ]; then
    exec ~/.xsession
else
    # 使用 XFCE 桌面环境
    exec startxfce4
fi

安装完,再连接,就可以进了,桌面和原生Ubuntu桌面有些不一样,包括一些环境变量也需要重新设置一下,终端不同了。

问题2

如果在这个界面,输入完密码,闪退了,也有可能是密码错误。

这个时候,重置一下密码:sudo passwd fpga

大概率能解决

问题3:

其他一些不知道的问题,可以Ubuntu查看一下xrdp log,前提是你已经能再Windows看到主机名

bash 复制代码
sudo tail -30 /var/log/xrdp-sesman.log

还有防火墙之类的问题,查查其他文章;

还有用指令查一下,xrdp是否正常启动着,启动着:

bash 复制代码
systemctl status xrdp.service #如果看到Active则说明正常
netstat -antup|grep xrdp #看xrdp和xrdp-sesman是否正常启动

更新

无意又看到一篇文章,还不错,增加做参考

https://blog.csdn.net/2301_76459044/article/details/147031270?fromshare=blogdetail\&sharetype=blogdetail\&sharerId=147031270\&sharerefer=PC\&sharesource=weixin_46423500\&sharefrom=from_link
WSL,Ubuntu-24.04如何添加图形桌面环境(Xfce 4)

相关推荐
柳暗花再明5 小时前
Visio 中设置文本框背景透明的方法
人工智能·windows
天庭鸡腿哥6 小时前
大小只有4K的软件,可让系统瞬间丝滑!
运维·服务器·windows·microsoft·everything
人工智能训练8 小时前
windows系统中的docker,xinference直接运行在容器目录和持载在宿主机目录中的区别
linux·服务器·人工智能·windows·ubuntu·docker·容器
q***65698 小时前
Windows环境下安装Redis并设置Redis开机自启
数据库·windows·redis
q***47438 小时前
Windows 和 Linux 系统下,如何查看 Redis 的版本号?
linux·windows·redis
q***96588 小时前
Windows版Redis本地后台启动
数据库·windows·redis
yewq-cn8 小时前
为什么 Windows 的镜像通常不能 dd 烧录
windows
百***864617 小时前
新版 WSL2 2.0 设置 Windows 和 WSL 镜像网络教程
windows
qq_4798754317 小时前
X-Macros(1)
linux·服务器·windows
王 富贵19 小时前
Conda常用命令大全
windows·conda