在Linux上启用Compton,可以按照以下步骤进行操作:
安装snapd(如果尚未安装):
sudo apt update sudo apt install snapd 安装Compton:
sudo snap install compton --classic 启动Compton:
compton 设置开机自启(可选):
sudo nano /etc/systemd/system/compton.service [Unit] Description=Compton Compositor After=graphical.target [Service] ExecStart=/snap/bin/compton Restart=always User=nobody Group=nogroup [Install] WantedBy=graphical.target sudo systemctl enable compton sudo systemctl start compton 添加PPA仓库:
sudo add-apt-repository ppa:butlerx/compiz sudo apt update 安装Compton:
sudo apt install compton 启动Compton:
compton 设置开机自启(可选):
sudo nano /etc/systemd/system/compton.service [Unit] Description=Compton Compositor After=graphical.target [Service] ExecStart=/usr/bin/compton Restart=always User=nobody Group=nogroup [Install] WantedBy=graphical.target sudo systemctl enable compton sudo systemctl start compton 安装flatpak(如果尚未安装):
sudo apt update sudo apt install flatpak 添加Flathub仓库:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo 安装Compton:
flatpak install flathub org.compton-project.Compton 启动Compton:
flatpak run org.compton-project.Compton 设置开机自启(可选):
sudo nano /etc/systemd/system/compton.service [Unit] Description=Compton Compositor After=graphical.target [Service] ExecStart=/var/lib/flatpak/exports/bin/org.compton-project.Compton Restart=always User=nobody Group=nogroup [Install] WantedBy=graphical.target sudo systemctl enable compton sudo systemctl start compton nobody或nogroup。~/.config/compton.conf,可以根据需要进行自定义。通过以上步骤,你应该能够在Linux系统上成功启用并运行Compton。