以下是在CentOS中配置Compton的步骤:
sudo yum update -ysudo yum install compton -ysudo yum install snapd -ysudo systemctl enable --now snapd.socketsudo ln -s /var/lib/snapd/snap /snapsudo snap install compton --classic/.config/compton.conf或/etc/compton.conf。backend(设置后端,如glx)、shadow(控制阴影)、opacity(设置透明度)等。例如:
nano /.config/compton.confbackend = "glx"; shadow = true; opacity = 0.8compton --config /.config/compton.conf。/etc/systemd/system/compton.service。[Unit]
Description=Compton Compositor
After=graphical.target
[Service]
ExecStart=/usr/bin/compton --config /.config/compton.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl enable comptonsudo systemctl start comptonps aux | grep compton查看进程,或查看日志文件(若有配置log-file选项)来验证。