温馨提示×

ubuntu compton怎么关闭

小樊
43
2026-10-15 20:49:14
栏目: 智能运维

在 Ubuntu 上“关闭 Compton”通常指停止或禁用这个 compositor(窗口合成器)。不同情况操作如下:

1. 如果只是临时关闭

如果你是用命令行启动的 Compton:

pkill compton

或(有些系统叫 picom):

pkill picom

2. 如果是开机自启动的(systemd 用户服务)

查看是否有服务:

systemctl --user status compton
# 或
systemctl --user status picom

停止并禁用:

systemctl --user stop compton
systemctl --user disable compton

(如果是 picom,把 compton 换成 picom)

3. 如果是通过 autostart 启动的

检查 ~/.config/autostart/:

ls ~/.config/autostart/ | grep -i compton

删除或移走对应文件:

rm ~/.config/autostart/compton.desktop

4. 如果是 Openbox / i3 等窗口管理器配置的

编辑配置文件:

  • i3: ~/.config/i3/config
  • Openbox: ~/.config/openbox/autostart

找到类似:

exec compton &

或

exec --no-startup-id compton

删掉这一行,然后重启会话。

5. 补充说明

  • 现在很多 Ubuntu 衍生版已用 picom 替代 compton
  • 如果是标准 Ubuntu(GNOME),本身不用 compton,合成由 Mutter 管理,不需要也不建议装 compton

如果你告诉我你用的是 Ubuntu 哪个版本 + 桌面环境(GNOME/KDE/i3/Openbox 等),我可以给你更精确的命令。

0 踩