Adding Borders and Shadows to Borderless Applications in KDE (Kubuntu 23.10)

Abstract: Force borders and shadows on borderless applications in KDE by creating specific window rules in System Settings.

Created: 2026-09-08 by

Use the KDE System Settings window decoration rules to force borders and shadows on specific applications. Navigate to Appearance, then Window Management, and select Window Rules. Create a new rule matching your target application’s class or name, then enable the "Force" options for border size and shadow under the Appearance section.

Many modern Linux applications are designed to be borderless, rendering their own title bars and controls internally. While this aesthetic is popular in tools like Discord, Slack, or certain web browsers, it can make window management difficult on a desktop environment like KDE Plasma. Users often struggle to resize these windows using the mouse or identify which window is active because standard visual cues are missing. In Kubuntu 23.10, the underlying window manager, KWin, provides powerful mechanisms to override these client-side decorations without breaking the application’s internal design. It is important to understand that you do not need to restart the window manager or modify environment variables to achieve this. Older guides might suggest running kwin_x11 --replace or setting QT_QPA_PLATFORMTHEME=qt5ct, but these methods are obsolete for modern setups. The QT_QPA_PLATFORMTHEME variable primarily affects dialog styling rather than window decorations, and forcing a compositor replacement can break Wayland sessions entirely. Instead, we rely on KWin’s built-in Window Rules engine, which operates at the compositor level and works seamlessly with both X11 and Wayland sessions.

Navigating to Window Rules

The primary interface for customizing window behavior in KDE is the System Settings application. Open the menu and locate the Appearance section. Within Appearance, find the Window Management subsection. Here you will see several tabs, including General, Desktop Layout, and Window Rules. Click on Window Rules to access the configuration panel where individual application behaviors are defined. This section allows you to create global rules that apply to all windows of a specific type, or specific rules that only trigger when certain conditions are met. For adding borders and shadows, we will create a specific rule targeted at a single application. This ensures that other applications remain untouched and continue to function as intended by their developers.

Creating a New Rule

Click the Add New Button button located at the top of the Window Rules list. A dialog will appear asking you to configure the properties. You can choose to match by Window Class, Window Title, or Application Name. For most applications, matching by Window Class is the most reliable method. If you are unsure of the class, you can use the Detect Properties tool, which lets you click on an open window to automatically fill in its details. Enter a descriptive name for the rule, such as "Add Border to AppName". Ensure that the option "Apply immediately" is checked so you can test the changes right away. Once created, the rule will appear in the list with a default set of properties. By default, most properties are set to "Default," meaning they inherit the global system settings. To change them, you must explicitly set them to "Force."

Forcing Borders and Shadows

With your new rule selected, look at the list of properties on the right side. Scroll down to the Appearance section. You will find options for Border Size and Shadow. These options control how the window frame is rendered by KWin, independent of the application’s internal UI. First, locate the Border Size property. Change the dropdown from "Default" to "Force". In the adjacent field, enter the desired pixel width for the border. A value of 1 or 2 pixels is usually sufficient for a subtle outline, while larger values may look disjointed from the application’s native design. Next, locate the Shadow property. Change this from "Default" to "Force" as well. Enable the shadow effect if it was previously disabled globally, or adjust the strength if needed. Some users may also wish to control the Window Type or Geometry. However, for simply adding visual boundaries, adjusting Border Size and Shadow is sufficient. Click OK to save the rule. The changes should take effect immediately. If the application does not update visually, try minimizing and restoring the window, or restarting the application.

Verifying the Configuration

To ensure the rule is working correctly, open the target application. Observe whether the border and shadow appear around the window frame. If they do not, return to System Settings and verify that the Window Class matches exactly. You can check the current window class by hovering over the window title bar and looking at the tooltip, or by using the command line tool wmctrl -l if you are comfortable with terminal commands. If the rule conflicts with another existing rule, you may need to adjust the priority. Rules are applied in order, so placing your new rule higher in the list gives it precedence. You can reorder rules by dragging them up or down in the list within the Window Rules editor.

Troubleshooting Common Issues

Occasionally, users may find that the borders appear but the shadow does not, or vice versa. This can happen if the application uses strict opacity settings that interfere with KWin’s compositing effects. In such cases, you might need to disable specific effects for that window. Go back to Window Management, then Effects, and look for Compositing rules. You can add a rule to disable transparency or blur for the specific application if necessary. Another common issue arises if the application resizes incorrectly after adding a border. Since the border is now part of the window frame, the internal content area may shift. Most modern applications handle this gracefully, but older ones might require manual adjustment of the initial geometry. You can force an initial position or size in the Window Rules editor under the Geometry section, though this is rarely needed for simple border additions. For more complex customization needs, such as changing the color of the border or adding rounded corners, you may need to explore additional KWin scripts or themes. However, for basic visibility and usability improvements, the Window Rules engine is robust and sufficient. If you encounter persistent errors with KDE components during this process, refer to our guide on troubleshooting KDE errors to diagnose potential package conflicts. Additionally, ensuring your system packages are up to date is crucial for avoiding known bugs in recent KWin releases.

Frequently Asked Questions

Will adding borders break the app's internal theme?

No, KWin renders the border outside the application’s client area. The internal UI elements remain controlled by the application itself. The border is purely a visual overlay managed by the window manager.

How do I remove a border I accidentally added?

Return to System Settings > Window Management > Window Rules. Find your rule and either delete it or change the Border Size property back to Default. The change applies immediately upon saving.

Does this work on Wayland sessions?

Yes, KWin’s Window Rules engine functions identically on both X11 and Wayland sessions in Kubuntu 23.10. No special configuration or session restarts are required.

Can I add borders to all windows at once?

You can create a global rule by leaving the detection criteria empty or broad. However, this is generally discouraged as it may interfere with games or fullscreen media players that require true borderless modes.

Why doesn't the shadow appear even though I forced it?

Check if the application has high opacity or transparency settings enabled. Some apps disable shadows for performance reasons. You may need to adjust the app’s internal settings or disable compositing effects for that specific window via the Effects settings.

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