温馨提示×

在哪里找debian compton配置

小樊
44
2026-09-29 01:39:22
栏目: 智能运维

在 Debian 上配置 Compton(现在更多被称作 picom,Compton 已停止维护)通常涉及以下几个地方:


1. 安装 Compton / picom

Debian 仓库里一般叫 compton 或更推荐用 picom:

sudo apt update
sudo apt install compton
# 或
sudo apt install picom

2. 配置文件位置

Compton / picom 的配置文件通常放在:

用户级配置(推荐)

~/.config/compton.conf
# 或 picom
~/.config/picom.conf

如果没有,可以手动创建:

mkdir -p ~/.config
touch ~/.config/compton.conf

示例配置

backend = "glx";
vsync = true;
shadow = true;
shadow-radius = 12;
shadow-opacity = 0.5;
fade = true;
fade-in-step = 0.03;
fade-out-step = 0.03;

3. 启动 Compton

手动启动

compton &
# 或
picom &

开机自启(无桌面环境管理)

加入 ~/.xinitrc 或 ~/.xprofile:

compton &

如果是桌面环境(如 XFCE / KDE / GNOME):

  • 在「会话和启动」里添加 compton 或 picom

4. 官方文档 & 示例

  • Compton 示例配置:
/usr/share/doc/compton/examples/compton.sample.conf
  • picom 示例:
/usr/share/doc/picom/examples/picom.sample.conf
  • GitHub(picom,推荐): https://github.com/yshui/picom

5. 排错建议

  • 确认你用的是 X11,不是 Wayland(Compton/picom 不支持 Wayland)
  • 查看日志:
picom --log-level DEBUG

如果你告诉我:

  • 你用的 桌面环境(XFCE / i3 / KDE 等)
  • 想实现什么效果(阴影 / 透明 / 性能优化)

我可以直接给你一份可用的 Debian compton 配置。

0 踩