Installing Compton on Ubuntu
To use Compton on Ubuntu, start by installing it via the 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.
Configuration File Setup
Compton’s configuration is managed via a config file, typically located at ~/.config/compton.conf (user-specific) or /etc/xdg/compton.conf (system-wide). If the file doesn’t exist, you can generate a default one by running:
compton --config > ~/.config/compton.conf
Common configuration options include:
"glx" (recommended for most systems) or "xrender" for rendering.shadow = true and customize offsets/opacity (e.g., shadow-offset-x = -15, shadow-opacity = 0.75).inactive-opacity = 0.8 (inactive windows) or active-opacity = 1.0 (active windows).glx-no-stencil = true (disables stencil buffer) or unredir-if-possible = true (redirects OpenGL windows to reduce load).Starting Compton
To start Compton manually, run the following command in a terminal:
compton -b --config ~/.config/compton.conf &
The -b flag runs Compton in the background, while --config specifies the path to your config file. If you omit --config, Compton will use the default location.
Autostarting Compton
To ensure Compton launches automatically after login, add it to your startup applications:
compton -b --config ~/.config/compton.conf
Checking Compton Status
To verify that Compton is running, use:
ps -e | grep compton
If Compton is active, you’ll see a process listed. To stop it, run:
killall compton
This terminates all Compton processes.
Troubleshooting Common Issues
vsync = "opengl-swc" in your config file.shadow = false) or use glx-no-stencil = true to reduce GPU load.shadow-exclude or opacity-rule. For example:shadow-exclude = ["name = 'Notification'", "class_g = 'Conky'"]
These adjustments help balance visual effects with system performance.