在Ubuntu中啟動Compton有以下幾種方法:
sudo apt update
和sudo apt install compton
。安裝后,在終端中輸入compton
即可啟動。若想使用特定配置文件,可添加--config
參數,如compton --config ~/.config/compton.conf
。/etc/systemd/system/compton.service
文件,添加內容[Unit] Description=Compton Window Composer After=xorg.service [Service] ExecStart=/usr/bin/compton --config ~/.config/compton.conf Restart=on-failure [Install] WantedBy=multi-user.target
。保存后運行sudo systemctl daemon-reload
、sudo systemctl enable compton
和sudo systemctl start compton
。