在 Ubuntu 上启动 Compton(现在更常见的是它的分支 Picom),可以按下面步骤来。
sudo apt update
sudo apt install compton
sudo apt install picom
compton
或
picom
如果没报错,说明已经运行了。
compton &
或
picom &
Comptonpicom
或compton
mkdir -p ~/.config/autostart
创建文件:
nano ~/.config/autostart/compton.desktop
内容:
[Desktop Entry]
Type=Application
Exec=picom
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Compton
mkdir -p ~/.config/picom
cp /etc/xdg/picom.conf ~/.config/picom/picom.conf
然后启动:
picom --config ~/.config/picom/picom.conf
尝试:
picom --backend glx
或
picom --backend xrender
killall picom
picom
如果你用的是 Ubuntu + GNOME,其实 GNOME 默认不支持 Compton(Wayland),需要切到 Xorg 登录会话才能用。
我可以帮你确认你的桌面环境是否支持。