在Ubuntu中启用Compton可以通过以下几种方法进行:
sudo apt update
sudo apt install compton
compton --config ~/.compton.conf
如果你没有自定义配置文件,可以直接运行 compton
。
3. 设置开机自启(可选):
sudo nano /etc/systemd/system/compton.service
在文件中添加以下内容:
[Unit]
Description=Compton Window Composer
After=graphical.target
[Service]
ExecStart=/usr/bin/compton --config ~/.compton.conf
Restart=on-failure
[Install]
WantedBy=graphical.target
保存并退出编辑器,然后启用并启动服务:
sudo systemctl daemon-reload
sudo systemctl enable compton
sudo systemctl start compton
~/.cache/compton.log
)以获取更多信息。请注意,Compton的开发已经停止,Ubuntu官方不再对其进行维护,转而推荐使用picom作为替代品。