温馨提示×

debian compton如何重启

小樊
42
2026-10-01 22:59:28
栏目: 智能运维

在 Debian 上如果你使用的是 Compton(现在多数发行版已改名为 picom,但命令和配置类似),重启方式取决于你是怎么启动它的。


一、先确认 Compton 是否在运行

ps aux | grep compton

或

pgrep compton

二、常见重启方法

方法 1:直接杀掉再启动(最通用)

pkill compton
compton &

或(如果你用的是 picom):

pkill picom
picom &

如果是 compton(旧名),命令就是 compton


方法 2:使用 systemd(如果你用 user service)

如果你创建了 ~/.config/systemd/user/compton.service:

systemctl --user restart compton

或

systemctl --user restart picom

方法 3:随窗口管理器 / 桌面环境启动

如果你是在:

  • .xinitrc
  • i3/config
  • openbox/autostart
  • 桌面环境“开机启动”里启动的

一般这样重启:

pkill compton
compton --config ~/.config/compton.conf &

三、修改配置后重启

如果你改了配置文件(如 ~/.config/compton.conf):

pkill compton
compton -b

-b 表示后台运行


四、排错小提示

  • Debian 新版本通常已无 compton,而是 picom
  • 查看是否安装:
    which compton picom
    
  • 查看错误:
    compton --show-all-errors
    

如果你告诉我:

  • Debian 版本
  • 桌面环境(GNOME / KDE / i3 / Openbox 等)
  • 用的是 compton 还是 picom

我可以给你最准确的一条命令。

0 踩