在 Linux 中,Compton 已经比较老了,现在大多被 picom 取代,但重启方式基本一样。下面按常见情况说明。
killall compton
或(如果没反应)
pkill compton
compton &
或后台运行:
compton -b
-b表示 background(后台运行)
如果你修改了配置文件,比如:
~/.config/compton.conf
重启时建议指定配置:
compton --config ~/.config/compton.conf -b
如果你是用 systemd 管理的(较少见):
systemctl --user restart compton
或停止 / 启动:
systemctl --user stop compton
systemctl --user start compton
⚠️ Compton 已停止开发,现在主流是 picom(Compton 的 fork)。
which compton
which picom
killall picom
picom -b
ps aux | grep compton
确认是否真的启动了。
查看错误:
compton
(不要加 -b,看终端输出)
killall compton && compton -b
如果你用的是 i3 / bspwm / Openbox 或某个发行版(如 Arch / Ubuntu),可以告诉我,我可以给你更精确的配置示例。