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)

相关推荐
HAPPY酷1 小时前
【ROS2】16G 内存笔记本跑 ROS2 仿真?VMware 虚拟机“保姆级”配置指南 (R9 7940HX + RTX 4060)
java·linux·ide·windows·pycharm
夜雪一千10 小时前
Python enumerate() 函数完整详解:遍历同时获取索引,告别手动计数
服务器·windows·python
问简20 小时前
【共享盘】ubuntu、windows
linux·windows·ubuntu
公子小六21 小时前
基于.NET的Windows窗体编程之WinForms图像控件
windows·microsoft·c#·.net·winforms
狂热开发者1 天前
用 Typeoff 把会后口述整理成 Markdown 决策记录
人工智能·windows·macos·ios·安卓
何中应1 天前
Windows7 虚拟机如何传文件
windows·vmware·虚拟机
一只小bit1 天前
LangChain 核型组件与消息管理及提示词模版
windows·microsoft·langchain
ofoxcoding1 天前
Codex Computer Use 完整指南:AI 自动操控 Mac 与 Windows 桌面实战详解
人工智能·windows·macos·ai
Nontee1 天前
Set 这个东西,跟我一开始想的不太一样
java·linux·windows·microsoft
XUHUOJUN1 天前
Windows Server 2025 Stretch Cluster 架构详解
windows·microsoft·azure local