ubuntu

ubuntu compton多显示器设置

小樊
56
2025-10-05 19:21:04
栏目: 智能运维

Installing Compton on Ubuntu
Before configuring multi-monitor settings, ensure Compton is installed. Run the following commands in the terminal to update your package list and install Compton:

sudo apt update
sudo apt install compton

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

Creating or Editing the Compton Configuration File
Compton’s configuration file is typically located at ~/.config/compton.conf. If this directory or file doesn’t exist, create it manually:

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

Use a text editor (like nano or vim) to add or modify configuration options. This file stores all settings for Compton’s behavior, including multi-monitor adjustments.

Configuring Multi-Monitor Support
To enable multi-monitor functionality, you need to specify which displays Compton should manage and use a compatible backend. Add the following lines to your compton.conf file:

Additional Recommended Settings
For better performance and aesthetics, include these optional configurations in your compton.conf:

These settings improve compatibility and performance for multi-monitor setups.

Running Compton with Your Configuration
After saving changes to compton.conf, test the configuration by running:

compton -c ~/.config/compton.conf

The -c flag tells Compton to use your custom config file. If everything works as expected, you’ll see window effects applied across all monitors.

Setting Up Compton for Auto-Start
To ensure Compton launches automatically when you log in, add it to your system’s startup applications:

  1. Open the “Startup Applications” tool from Ubuntu’s application menu.
  2. Click “Add” and enter a name (e.g., “Compton”).
  3. In the “Command” field, enter:
    compton -b -c ~/.config/compton.conf
    
    The -b flag runs Compton in the background.

Troubleshooting Common Issues

By following these steps, you can configure Compton to support multi-monitor setups on Ubuntu, enabling hardware-accelerated window effects across all displays.

0
看了该问题的人还看了