在 Ubuntu 上,Compton(现在多被 picom 取代)本身只是一个窗口合成器,所谓“备份 Compton”通常指下面几类内容。你可以按需选择。
Compton 的配置文件一般在:
~/.config/compton.conf
# 或
~/.compton.conf
cp ~/.config/compton.conf ~/compton.conf.bak
# 或
cp ~/.compton.conf ~/compton.conf.bak
cp ~/compton.conf.bak ~/.config/compton.conf
配置文件通常是:
~/.config/picom/picom.conf
备份:
cp ~/.config/picom/picom.conf ~/picom.conf.bak
如果你在 Ubuntu 中设置了开机启动 Compton:
查看是否存在:
systemctl --user list-unit-files | grep compton
如果有:
~/.config/systemd/user/compton.service
备份:
cp ~/.config/systemd/user/compton.service ~/compton.service.bak
备份:
cp ~/.config/autostart/compton.desktop ~/compton.desktop.bak
查看是否安装:
which compton
# 或
dpkg -l | grep compton
记录安装方式(apt / 源码 / snap):
apt list --installed | grep compton
mkdir -p ~/backup/compton
cp ~/.config/compton.conf ~/backup/compton/ 2>/dev/null
cp ~/.compton.conf ~/backup/compton/ 2>/dev/null
cp ~/.config/systemd/user/compton.service ~/backup/compton/ 2>/dev/null
cp ~/.config/autostart/compton.desktop ~/backup/compton/ 2>/dev/null
.conf 文件即可如果你愿意,可以告诉我:
我可以给你更精确的备份方案。