在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作為替代品。