ubuntu

Ubuntu Compton与Gnome:完美搭配指南

小樊
42
2025-10-11 22:56:50
栏目: 智能运维

Installing Compton on Ubuntu
To begin, install Compton using Ubuntu’s package manager. Open a terminal and run:

sudo apt update && sudo apt install compton

This command installs the latest version of Compton available in Ubuntu’s repositories.

Configuring Compton for GNOME
Compton’s behavior is controlled by a configuration file typically located at ~/.config/compton.conf. If this directory or file doesn’t exist, create it:

mkdir -p ~/.config && nano ~/.config/compton.conf

Add the following essential settings to balance performance and aesthetics. These settings enable OpenGL rendering (for smoother animations), exclude Firefox from shadows (to avoid visual glitches), and enable fading for window transitions:

backend = "glx";
shadow-exclude = ["class='.*Firefox'"];
fade = true;
fade-delta = 30;

Save the file (Ctrl+O, Enter) and exit the editor (Ctrl+X). For advanced customization, refer to Compton’s official documentation to tweak parameters like shadow opacity (shadow-opacity), refresh rate (force-frame-rate), or transparency thresholds (alpha-threshold).

Starting Compton Automatically in GNOME
To ensure Compton launches every time you log into GNOME, add it to your startup applications. You can do this via the terminal or GNOME’s graphical interface:

Verifying the Setup
After logging out and back in (or running compton --config ~/.config/compton.conf manually), check if Compton is active. You should see window shadows (unless excluded) and smooth fade effects when minimizing/maximizing windows. If you encounter issues (e.g., window flickering), press Alt+F2, type r, and press Enter to restart GNOME Shell—this often resolves temporary glitches.

Troubleshooting Common Issues

0
看了该问题的人还看了