温馨提示×

Compton在Ubuntu中的使用教程是什么

小樊
41
2025-09-14 14:42:36
栏目: 智能运维

以下是Compton在Ubuntu中的使用教程:

安装Compton

打开终端,依次输入以下命令更新系统并安装Compton:

sudo apt update
sudo apt install compton

配置Compton

在终端中输入以下命令创建配置文件:

mkdir -p ~/.config/compton
compton --example-config > ~/.config/compton/compton.conf

用文本编辑器打开配置文件,可修改以下常用选项:

  • backend:设置后端,如glxxrender
  • shadow:控制窗口阴影,设为truefalse
  • opacity:设置窗口透明度,取值0.0到1.0。
  • vsync:控制垂直同步,设为truefalse

启动Compton

在终端中输入以下命令手动启动Compton:

compton --config ~/.config/compton/compton.conf -b

若要让Compton随系统启动,可将其添加到桌面环境的启动脚本中,如在i3窗口管理器的~/.config/i3/config文件中添加exec --no-startup-id compton --config ~/.config/compton/compton.conf -b

0