温馨提示×

ubuntu compton怎么禁用

小樊
43
2026-10-24 16:42:11
栏目: 智能运维

在 Ubuntu 上禁用 Compton(通常作为窗口合成器使用,常见于 i3 / Openbox 等环境),可以按下面几种情况处理:


一、如果你是用 systemd 启动的 Compton

1. 停止并禁用服务

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

如果你是用 root 或系统级服务:

sudo systemctl stop compton
sudo systemctl disable compton

二、如果你是用 .xinitrc 或 桌面环境自动启动的

1. 检查并编辑 ~/.xinitrc

打开:

nano ~/.xinitrc

删除或注释掉类似这一行:

compton &
# 或
compton -b &

保存后退出。


2. 检查 autostart(常见于 i3 / XFCE / LXDE)

i3 用户

编辑 i3 配置文件:

nano ~/.config/i3/config

找到:

exec compton

或

exec --no-startup-id compton

注释掉或删除这一行。


XFCE / LXDE

打开:

xdg-autostart

或:

ls ~/.config/autostart/

删除 compton.desktop:

rm ~/.config/autostart/compton.desktop

三、如果只是想临时关闭(不重启)

pkill compton

四、如果你用的是 picom(compton 的 fork)

很多新系统里 compton 已被 picom 取代:

pkill picom
systemctl --user disable picom

五、确认是否还在运行

ps aux | grep -E "compton|picom"

如果你告诉我:

  • Ubuntu 版本
  • 使用的桌面环境(GNOME / KDE / i3 / XFCE 等)

我可以给你更精确的禁用方式。

0 踩