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)

相关推荐
sukalot10 小时前
Windows显示驱动开发-支持显示输出和 ACPI 事件
windows
爱隐身的官人10 小时前
Windows安全狗安装教程
windows·安全·安全设备
wulitoud12 小时前
[好用工具] 一款mac/windows电脑历史剪切板工具,类似著名的Paste
windows·macos·sublime text
APItesterCris13 小时前
构建弹性数据管道:利用淘宝商品 API 进行流式数据采集与处理
linux·数据库·windows
奋斗羊羊16 小时前
【C++】使用MSBuild命令行编译ACE、TAO、DDS
开发语言·c++·windows
郁大锤18 小时前
在 Windows 下安装与快速上手 Wireshark(抓包工具)
windows·测试工具·wireshark
路由侠内网穿透1 天前
本地部署开源持续集成和持续部署系统 Woodpecker CI 并实现外部访问
服务器·网络·windows·ci/cd·开源
CsharpDev-奶豆哥1 天前
ASP.NET中for和foreach使用指南
windows·microsoft·c#·asp.net·.net
Microsoft Word1 天前
跨平台向量库:Linux & Windows 上一条龙部署 PostgreSQL 向量扩展
linux·windows·postgresql