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)

相关推荐
星火开发设计1 小时前
Python数元组完全指南:从基础到实战
开发语言·windows·python·学习·知识·tuple
hudawei9961 小时前
win和Mac在创建python虚拟环境,启动环境等操作的异同
windows·python·macos·虚拟环境
亮子AI1 小时前
Windows 桌面软件用什么框架开发好?
windows
非凡ghost1 小时前
12-Ants(轻量级桌面娱乐工具)
windows·学习·娱乐·软件需求
武藤一雄12 小时前
C# 关于多线程如何实现需要注意的问题(持续更新)
windows·后端·microsoft·c#·.net·.netcore·死锁
coding消烦员15 小时前
在 Windows 内网搭建 Git 仓库:共享普通仓库 vs 中心 bare 仓库
windows·git
xiaoliuliu1234519 小时前
IE8-WindowsXP-x86-CHS_23253_BDdl.exe 安装步骤(XP 32位简体中文版)
windows
百事牛科技19 小时前
文件不想再加密了?取消Word 打开密码的方法
windows·word
love530love21 小时前
EPGF 新手教程 13在 PyCharm(中文版 GUI)中创建 Hatch 项目环境,并把 Hatch 做成“项目自包含”(工具本地化为必做环节)
开发语言·ide·人工智能·windows·python·pycharm·hatch
峰上踏雪21 小时前
Go(Golang)Windows 环境配置关键点总结
开发语言·windows·golang·go语言