[deepin exploration] 在 Ubuntu 24.04 LTS上折腾 Deepin 桌面的八小时实录:从入门到放弃
Tofloor
poster avatar
132******96
deepin
13 hours ago
Author

包含:(版本选择导致的依赖地狱、DBus 策略、Deepin桌面组件使用Systemd 用户服务、段错误分析与回滚指南,AI协助

摘要: 本文记录了在 ThinkPad X250 上为 Ubuntu 24.04 安装 Deepin 桌面的完整过程。从网络限速、依赖冲突到 LightDM 黑屏,再到 dde-dconfig-daemon 因用户缺失和 DBus 策略崩溃,最终定位到 Application Manager 用户服务与 systemd 兼容性问题。全文包含所有排查命令、部分日志分析和最终回滚方案,适合想在非原生发行版上折腾 Deepin 的勇士参考。

避雷:有一部分日志由于难以导出,一小部分属于拍摄屏幕,暂且按下不表,不过目前展示的信息量应该已经足以解释我和AI作出如此选择的原因了。

前言:为什么想不开(bushi)想换桌面

主要是用了半年Ubuntu,看GNOME有点太素了,一边不想换系统一边想体验Deepin的设计。于是开始作死.jpg

---关于本次使用的设备和系统参数---
OS: 		Ubuntu 24.04.4 LTS x86_64 
Host: 		ThinkPad X250 
Kernel: 	6.17.0-14-generic 
Shell: 		bash 5.2.21 
DE: 		GNOME 46.0 
Terminal:	gnome-terminal 
CPU: 		Intel i3-5010U (4) @ 2.100GHz 
GPU: 		Intel HD Graphics 5500 
Memory:		7819MiB 

---关于本文---

Tips:这篇文章不是简单的“三步安装指南”,而是一次完整的踩坑实录,旨在帮助后来者避开我遇到的各种自己作死导致的问题。(高血压警告!!!)

附件列表

Output.txterror2.txterror.txttest.txt

Reply Favorite View the author
All Replies
132******96
deepin
13 hours ago
#1

--- Chapter I:从限速开始的Ubuntudde-dde下载---

首先添加官方PPA:sudo add-apt-repository ppa:ubuntudde-dev/stable 这一步没有出错

更新apt源并试图安装

sudo apt update
sudo apt install ubuntudde-dde ubuntudde-dde-extras

---限速问题的处理---

第一个意外来得很快:apt 下载速度只有 5KiB/s。这显然不是正常的网络状况。我决定换源。

测试中科大镜像速度:

*curl -o /dev/null -w "%{speed_download}\n" https://launchpad.*.ustclug.org/ubuntudde-dev/stable/ubuntu/dists/jammy/Release

返回速度 12.9KiB/s,比官方源快一点,但还不够。先换源,祭出多线程下载工具。

备份apt源文件:

sudo cp /etc/apt/sources.list.d/ubuntudde-dev-ubuntu-stable-noble.sources /etc/apt/sources.list.d/ubuntudde-dev-ubuntu-stable-noble.sources.bak

编辑apt源文件:

sudo nano /etc/apt/sources.list.d/ubuntudde-dev-ubuntu-stable-noble.sources

修改ppa.launchpad.net中的Types和URIs

Types: deb
URIs: https://launchpad.*.ustclug.org/ubuntudde-dev/stable/ubuntu

配置多线程下载axel(建议提前准备好axia2下载,提供中断下载支持)

sudo apt install axel -y
sudo tee /etc/apt/apt.conf.d/80axel <

然后配置apt-fast (这个不在官方源里面所以先手动添加ppa)

sudo add-apt-repository ppa:apt-fast/stable
sudo apt install apt-fast

PS.据说如果在Unpacking阶段OR Setting up阶段中断了,可以使用:

sudo dpkg --configure -a
sudo apt install -f

修复损坏的包

在2号终端内更新apt

sudo apt update

这里我犯了个蠢,把自己系统的版本号记成了 22.04(实际上是24.04)

所以我安装了apttitude来试图修复依赖问题

sudo apt install aptitude

后面重新改回去镜像路径就好了(

安装过程提示选择Display Manger,按照文档指导,我选择了lightdm

reboot
Reply View the author
132******96
deepin
13 hours ago
#2

---Chapter II:LightDM 黑屏与 GRUB 救援---

reboot之后自检过程中黑掉了,似乎死机,但GRUB引导和自检应该是正常的,按下关机键之后重新显示了自检行,且多次反复之后发现每次停留的自检位置不同,同时注意到闪过的自检画面里lightdm正常启动了。

试图ctrl alt fn盲切进入虚拟tty发现很可能连系统都没进(

由于本人之前嫌弃GRUB选择单,然后把GRUB选择单关闭,所以现在只能使用USB内的live版系统启动了(

在live版系统(kali Linux)里面

sudo fdisk -l #查阅分区
sudo mount /dev/sda2 /mnt		#挂载分区
sudo mount /dev/sda1 /mnt/boot		#挂载boot分区
sudo mount --bind /dev /mnt/dev		#挂载其他的必须分区,方便修改grub文件
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt   #进入ubuntu
nano /etc/default/grub

--把如下选项改为此形式--

GRUB_TIMEOUT=5
GRUB_CMDLINE_LINUX_DEFAULT=""

退出nano,并update-grub

这里我们把GDM3恢复,确定能进入桌面

dpkg-reconfigure lightdm

修改选项为** gdm3**

然后顺手重装一遍lightdm,修复依赖问题

apt install --reinstall lightdm
apt install -f

退出chroot

exit 
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt

重启回到ubuntu

Reply View the author
132******96
deepin
13 hours ago
#3

---Chapter III:核心崩溃——dde-dconfig 的用户之谜---

---Chapter III-I:服务切割脚本---

最开始我以为是我使用的一个服务切割脚本导致的bug

脚本参见:test.txt(该脚本在修改后缀为.sh后即可使用,不过个人非常不建议使用该脚本)

journalctl -xe | grep -i error #指令输出参见日志附件error.txt

简单恢复之后

---启动时需要一个指定用户---

systemctl list-units --type=service | grep -i dde #指令输出结果参见附件error2.txt
#关键输出:de-dconfig-daemon.service : Failed to determine user credentials: No such process 

问题既然是没有用户,那么我们就手动创建一个,先查找源文件,观察需要的用户

sudo systemctl cat dde-dconfig-daemon.service #该指令详细输出结果参见附件Output.txt
---关键输出如下---
User=deepin-daemon
BusName=org.desktopspec.ConfigManager
观察到输出中显示User=deepin-daemon

#手动创建系统用户deepin-daemon

sudo useradd -r -s /usr/sbin/nologin -M deepin-daemon

#手动启动daemon.service:两条指令详细输出参见 error.txt第 392 行

sudo systemctl start dde-dconfig-daemon.service
#关键输出了:dde-dconfig-daemon  Active: failed (Result: exit-code) since Wed 2026-03-04 01:23:44 CST; 42s ago

sudo systemctl status dde-dconfig-daemon.service
#关键输出了:de-dconfig-daemon[29964]: "Can't register the org.desktopspec.ConfigManager service, Connection \":1.158\" is not allowed to>

#开始检查是否名称被占用(未被占用)

busctl --system list | grep org.desktopspec.ConfigManager

#查看dbus策略文件是否存在(结果存在)

sudo grep -r "org.desktopspec.ConfigManager" /etc/dbus-1/system.d/ /usr/share/dbus-1/system.d/

DBus 策略定义了谁可以拥有哪个服务名,缺失会导致服务无法注册。

#检查服务文件是否被安装(正常安装)

ls -l /usr/share/dbus-1/system-services/org.desktopspec.ConfigManager.service
cat /usr/share/dbus-1/system-services/org.desktopspec.ConfigManager.service
Reply View the author
132******96
deepin
13 hours ago
#4

---Chapter IV:虚假的曙光——第一次进入桌面但卡成 PPT---

在这一小节,本人终于进入了DDE桌面,但是全程折腾下来不仅卡顿,连任务栏,tty和终端都无法使用

使用下面的指令简单的重启了dbus以后,电脑黑屏死机,只好电源按键强制关机。

sudo systemctl restart dbus

本人和AI的原话是:

“我进去了,但是感觉好像启动之后卡疯了,我试着ctrl alt t终端都没有出来。另外,目前的显示服务器已经换成lightdm,tty失效。 Dock栏到现在都没有显示出来,现在开机以后应该已经过去了9分钟”

#在这里通过右键桌面(Ctrl Alt T失效)启动了深度终端,先执行了

cd
sudo apt update && apt upgrade

#重新安装dde-shell

sudo apt install --reinstall dde-shell dde-tray-loader
/usr/bin/dde-shell
#关键输出提示:无法连接dde-dcondig-daemon,段错误(核心已转储)
Reply View the author
132******96
deepin
13 hours ago
#5

---Chapter V:段错误深渊——Application Manager 的缺失---

#检查Dbus策略

ls -l /usr/share/dbus-1/system.d/org.desktopspec.ConfigManager.conf

#检查 DBus 服务激活文件

cat /usr/share/dbus-1/system-services/org.desktopspec.ConfigManager.service

#查看Dbus日志

sudo journalctl -u dbus | grep -i configmanager | tail -20

#此处日志里面输出的均为:

Activity via systemd:Service name='org.desktopspec.ConfigManger' unit='dde-dconfig-daemon.service' requested by ':1.562' (uid 1000 pid 77304 comm”/usr/bin/dde-appearance” label=''unconfined''

#手动运行程序sudo -u deepin-daemon /usr/bin/dde-dconfig-daemon的时候提示failed opening file,没有那个文件或目录。详细目录我省略了,具体来说应该是。dde-dconfig-daemon.log和他的上级目录

--那么手动补全目录--

#创建日志目录
sudo mkdir -p /var/log/deepin
sudo chown deepin-daemon:deepin-daemon /var/log/deepin
sudo chmod 755 /var/log/deepin
#创建状态目录
sudo mkdir -p /var/lib/dde-dconfig-daemon
sudo chown deepin-daemon:deepin-daemon /var/lib/dde-dconfig-daemon
sudo chmod 700 /var/lib/dde-dconfig-daemon   # 服务文件中 Mode=0700
#创建空置家目录
sudo mkdir -p /home/deepin-daemon
sudo chown deepin-daemon:deepin-daemon /home/deepin-daemon
sudo chmod 700 /home/deepin-daemon

#手动运行服务,正常。

sudo -u deepin-daemon /usr/bin/dde-dconfig-daemon
sudo systemctl start dde-dconfig-daemon
sudo systemctl status dde-dconfig-daemon

再次重启dde-shell

/usr/bin/dde-shell

---dde-dconfig-daemon的AM段错误---

--deepseek的分析--

Starting dconfig daemon succeeded." 表明初始化部分成功。
"Can't getId from AM for the 150070, because AM is unavailable." – AM 可能指 Application Manager(应用管理器),是 Deepin 的另一个服务,当前可能没启动或不可用。
"Config's prefix path is: "/home/depin-daemon/.config"" – 注意路径是 "/home/depin-daemon/.config",但用户是 deepin-daemon,这个路径是正确的吗?我们之前创建了 /home/deepin-daemon,但可能没创建 .config 目录或者权限不对。不过程序似乎已经找到了路径,但后面崩溃可能与写入或读取该目录下的文件有关。
"Created connection: ..." 说明 DBus 连接建立成功。
"Add watcherd service..." 添加监控服务。
然后 "App exited due to receiving signal 11" 段错误。
Reply View the author
132******96
deepin
13 hours ago
#6

---Chapter VI:云中月般的答案 ,dde-dconfig未能完全安装---

dpkg -l | grep dde-dconfig #无输出

#试图重新安装dde-dconfig,无效

sudo apt install --reinstall dde-dconfig dde-dconfig-daemon

#整体重装

sudo systemctl start dde-dconfig-daemon
sudo systemctl status dde-dconfig-daemon

/usr/bin/dde-shell #翻车了

#试图确认dde-dconfig-daemon 当前状态

sudo systemctl status dde-dconfig-daemon

dde-dconfig-daemon 服务依然段错误,核心转储。错误信息中明确提到:“Can't getid from AM for the 22934 , because AM is unavailable.” 说明 Application Manager (AM) 未运行或不可用,而 dde-dconfig-daemon 需要与 AM 通信,但由于 AM 缺失,它可能访问了空指针导致段错误。

#查看包安装的文件列表

dpkg -L dde-application-manager | grep -i systemd

#输出如下:

/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/org.desktopspec.ApplicationUpdateNotifier1.service
/usr/lib/systemd/user
/usr/lib/systemd/user/app-DDE-.service.d
/usr/lib/systemd/user/app-DDE-.service.d/override.conf
/usr/lib/systemd/user/dde-session-initialized.target.wants
/usr/lib/systemd/user/org.desktopspec.ApplicationManager1.service
/usr/lib/systemd/user/dde-session-initialized.target.wants/org.desktopspec.ApplicationManager1.service

发现:dde-application-manager 的包提供了 org.desktopspec.ApplicationManager1.service,并且安装在 user mode

#检查用户服务状态

systemctl --user status org.desktopspec.ApplicationManager1.service
输出failed

#启动用户服务,成功

systemctl --user start org.desktopspec.ApplicationManager1.service

#开机自启动,失败,忽略,先尝试启动服务

systemctl --user enable org.desktopspec.ApplicationManager1.service

#验证服务运行状态

systemctl --user status org.desktopspec.ApplicationManager1.service

输出为active

此后dde-dconfig-daemon依然段错误,报错还是“Can't get id from AM”

相关输入/输出参见附件error2.txt30

Reply View the author
132******96
deepin
13 hours ago
#7

---Chapter VII:永不相见的AM和Dbus---

“systemctl --user 管理的是用户级服务,随登录启动,与系统服务是隔离的。”

#检查 AM 进程是否真实存活

ps aux | grep dde-application-manager

#尝试停止并重启用户服务

systemctl --user stop org.desktopspec.ApplicationManager1.service
systemctl --user start org.desktopspec.ApplicationManager1.service

#查看 AM 的完整日志(包括崩溃信息)

journalctl --user -u org.desktopspec.ApplicationManager1.service -n 50 --no-pager

#如果 AM 确实崩溃,尝试重新安装

sudo apt install --reinstall dde-application-manager
systemctl --user daemon-reload
systemctl --user start org.desktopspec.ApplicationManager1.service
#检查 DBus 接口是否正常注册(正常)
busctl --user list | grep ApplicationManager1

有输出,表示名字已注册。进一步内省,失败,接口未暴露
busctl --user introspect org.desktopspec.ApplicationManager1 /org/desktopspec/ApplicationManager1

#尝试直接运行 AM(前台)看错误

killall dde-application-manager   # 先杀掉现有进程
/usr/bin/dde-application-manager

相关日志参见error2.txt165

Reply View the author
132******96
deepin
13 hours ago
#8

---Chapter VIII:几条线索和跑路指南---

1:deepin下,发现好像鼠标指针在点击控件时不稳定,会从ubuntu默认指针,闪烁成deepin默认指针

清理手动添加的所有残留(用户、目录、策略、PPA)

sudo userdel deepin-daemon 2>/dev/null
sudo rm -rf /var/log/deepin /var/lib/dde-dconfig-daemon /home/deepin-daemon
sudo rm -f /usr/share/dbus-1/system.d/org.desktopspec.ConfigManager.conf
sudo rm -f /etc/apt/sources.list.d/ubuntudde*.list /etc/apt/sources.list.d/ubuntudde*.sources

卸载 Deepin 相关包

sudo apt update
sudo apt purge ubuntudde-dde ubuntudde-dde-extras dde-* deepin-* -y
sudo apt autoremove --purge -y

#切回 GDM3 并重启

sudo systemctl disable lightdm
sudo systemctl enable gdm3
sudo reboot

这次折腾教会了我什么?

永远先确认系统版本和源地址是否匹配——lsb_release -a 是第一命令。

systemd 服务文件中的 User= 需要手动确保存在,否则就是 status=217。

DBus 是 Linux 桌面的神经,策略文件缺失会让服务“有口难言”。

区分系统服务和用户服务,用 --user 标志。

至此,我回到了Ubuntu并写下了这篇记录,也欢迎各位大佬指出我操作中的错误^-^

有一部分日志由于难以导出,一小部分属于拍摄屏幕,暂且按下不表,不过目前展示的信息量应该已经足以解释我和AI作出如此选择的原因了。

LanICE 0099

2026/3/5/16:27

Reply View the author
deepin-chinaren
deepin
13 hours ago
#9

是不是折腾寄觉得时间过的好快呀,吃饭的匆匆忙忙的呀。我很有体会。

Reply View the author
132******96
deepin
13 hours ago
#10
deepin-chinaren

是不是折腾寄觉得时间过的好快呀,吃饭的匆匆忙忙的呀。我很有体会。

我从晚上8点折腾到了第二天的4点(捂)

最开始看AI说只要apt install就可以了,没想到后面这么多问题哈哈

Reply View the author
穿西装的万斯在统亻言
deepin
Backbone of ecological co-construction group
12 hours ago
#11

你还不如安装GXDE桌面呢,这个是以前旧版的DDE拿过来修bug的

Reply View the author
财鼠N
deepin
10 hours ago
#12

厉害👍

Linux就是用来折腾的😄

Reply View the author
pzm9012
Moderator
7 hours ago
#13

UbuntuDDE上次还是基于23.04适配,Ubuntu底层早就变了

Reply View the author
132******96
deepin
6 hours ago
#14
pzm9012

UbuntuDDE上次还是基于23.04适配,Ubuntu底层早就变了

apt安装没提示依赖问题,没想到最后是系统太新(

Reply View the author