Setting up Dual Heads on CentOS

Abstract: Resolve dual monitor configuration issues on CentOS by identifying the display server and applying the correct setup method for Wayland or X11.

Created: 2026-09-15 by
Configuring dual monitors on CentOS requires a different approach depending on whether you are using the traditional X11 desktop environment or the newer Wayland compositor. This guide explains how to set up multiple displays for both environments, ensuring your productivity is maximized regardless of the underlying display server technology running on your system.

Determining Your Display Server

Before attempting any configuration changes, it is critical to identify which display server your CentOS session is currently using. Modern versions of CentOS, particularly CentOS Stream and later releases, default to Wayland for security and performance reasons. Older setups or specific server configurations may still rely on X11 (Xorg). The method used to configure monitors differs significantly between these two systems, so applying X11 instructions to a Wayland session will likely result in errors or no visible change. To check your current display server, open a terminal window and run the following command:
echo $XDG_SESSION_TYPE
If the output is x11, you are using the legacy X server. If the output is wayland, you are using the modern Wayland compositor. Additionally, you can verify this by looking at the login screen; if you see an option to select "GNOME" versus "GNOME on Xorg," the latter indicates X11, while the former typically indicates Wayland. Knowing this distinction prevents wasted time troubleshooting commands that are incompatible with your current environment.

Configuring Dual Monitors on Wayland

Wayland handles display configuration through the desktop environment's native settings rather than low-level command-line tools like xrandr. For most CentOS users running the GNOME desktop environment, the process is intuitive and graphical. Start by connecting both monitors to your system and ensuring they are powered on. Log into your GNOME session. Navigate to the Activities overview by clicking the top-left corner or pressing the Super key. From there, click on Settings. In the Settings menu, scroll down to find the Displays section. Inside the Displays panel, you will see a visual representation of your connected monitors. They are usually labeled as 1 and 2. You can rearrange them by dragging the boxes to match their physical arrangement on your desk. This ensures that moving your mouse off the right side of monitor one takes you to the left side of monitor two. You can also adjust the resolution and refresh rate for each individual screen from dropdown menus within this same panel. If one monitor is not detected, ensure the cable connections are secure and try toggling the monitor off and on again. Once satisfied with the layout, close the Settings window; GNOME saves these preferences automatically. For advanced users who require scripting or automation, Wayland does support some command-line tools, but they are less universal than xrandr. Tools like kscreen-doctor (for KDE) or specific GNOME extensions may be required for complex multi-monitor setups involving more than two screens or non-standard resolutions. However, for standard dual-head setups, the GUI method is the most reliable and supported path.

Configuring Dual Monitors on X11

If your system is confirmed to be running X11, you have more granular control via the command line using the xrandr utility. This tool allows you to query connected outputs and set precise positioning and resolution parameters. First, open a terminal and run xrandr without arguments. This will list all available video outputs (such as HDMI-1, DP-1, VGA-1) and their current status. Look for lines that say "connected" to identify your active monitors. To arrange two monitors side-by-side, you can use the following command structure, replacing the output names with those found in your previous step:
xrandr --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --output DP-1 --mode 1920x1080 --pos 1920x0
This command sets HDMI-1 as the primary display at the origin (0,0) and places DP-1 immediately to its right at position (1920,0). If you want to extend the desktop rather than mirror it, this positional setup achieves that goal. To mirror the displays instead, use the --same-as flag:
xrandr --output HDMI-1 --mode 1920x1080 --output DP-1 --same-as HDMI-1
While xrandr provides powerful control, these settings are temporary and will reset upon reboot. To make them permanent, you must add the command to your startup applications. In GNOME on X11, you can do this by going to Settings > Applications > Startup, adding a new entry that runs your xrandr script. Alternatively, you can place the command in your .xprofile or .bashrc file, though the GUI method is generally safer and easier to manage. It is worth noting that some hardware drivers, particularly for older NVIDIA cards, may require additional configuration in the xorg.conf file to work seamlessly with xrandr. If you encounter issues where the second monitor remains black or unrecognized, checking the driver logs in /var/log/Xorg.0.log can provide diagnostic clues.

Troubleshooting Common Issues

Regardless of the display server, several common issues can arise when setting up dual heads. One frequent problem is detection failure. If a monitor is not listed in either the GNOME Settings or the xrandr output, check the physical connections. Try a different cable or port to rule out hardware faults. Another issue is incorrect orientation. If the image appears rotated, you can correct this in the GUI settings or via xrandr using the --rotate left/right/inverted flags. Performance lags on the secondary monitor might indicate a bandwidth bottleneck, especially with high-resolution displays over HDMI. Ensure you are using high-quality cables rated for the resolution and refresh rate you intend to use. For users managing servers remotely, remember that configuring local displays does not affect SSH sessions, which remain text-based unless explicitly configured otherwise. For more information on remote access configurations, you might find our guide on Troubleshooting SSH Port Change Issues in Almalinux9 helpful for understanding network layer configurations that complement display setups.

Frequently Asked Questions

Can I use xrandr on Wayland?

No, xrandr is designed specifically for the X11 display server and will not work on Wayland sessions. Attempting to run it will either return an error or have no effect. You must use the desktop environment's native settings interface instead.

How do I make xrandr settings permanent?

To persist xrandr configurations across reboots, add the command to your user’s startup applications. In GNOME, this is done via Settings > Applications > Startup. You can also create a shell script containing the commands and execute it upon login.

Why is my second monitor not detected?

Detection failures are often caused by loose cables, faulty ports, or driver issues. Verify the physical connection first. If the hardware is fine, check your graphics driver installation and ensure it supports the specific monitor model. Rebooting the system after connecting the monitor can also help trigger detection.

What is the difference between extending and mirroring displays?

Extending displays treats the monitors as one large workspace, allowing you to drag windows between them. Mirroring duplicates the exact same content on both screens simultaneously. Extending is ideal for productivity, while mirroring is useful for presentations.

Does this guide apply to CentOS Stream?

Yes, the principles for Wayland and X11 configuration apply to CentOS Stream as well. Since CentOS Stream is closely aligned with Red Hat Enterprise Linux (RHEL), the display server behaviors and available tools are identical to those described in this article.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More