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)

相关推荐
?re?ta?rd?ed?15 小时前
C++11新特性,{}与左值
c++·windows
必须得开心呀18 小时前
windows10系统任务栏图标消失修复
windows
zl_dfq18 小时前
Windows 下 UDP 套接字编程指南
网络·windows·udp
学习论之费曼学习法19 小时前
无人值守AI内容矩阵实战(10):Windows 上让 Python 进程 7×24 活着
人工智能·windows·python·矩阵·powershell·进程守护
少年的范儿20 小时前
Windows 安装 MySQL 8.4 教程(ZIP 解压版):配置 my.ini、初始化数据库与启动服务
数据库·windows·mysql
胖纸不争20 小时前
EnergyStarZ:让 Windows 后台进程给前台让路的能效管理器(v1.2 发布)
windows·性能优化·c#·win32·ef core
2501_915909061 天前
Windows 上用 VS Code 调试 iPhone 真机 App,KXBuild 断点、崩溃定位实操
ide·windows·vscode·ios·iphone·个人开发·敏捷流程
情 九1 天前
MCP 开发环境搭建:Mac 与 Windows 跑通 Python 服务和 stdio 客户端
windows·python·macos·mcp
懂点Tech1 天前
ctfshow misc28:GIF 高度修改解题与脚本实现
开发语言·windows·python
云梦谭1 天前
让 Linux 主动连接 Windows:配置 Windows 11 SSH 服务端
linux·windows·ssh