Enable and Customize Ubuntu Dark Theme

Khimananda Oli 9 min read Virtualization
Enable and Customize Ubuntu Dark Theme

By Khimananda Oli | Last reviewed: August 2026

Eye strain during late-night coding sessions is a common complaint among developers working on Linux workstations. The default Yaru theme in Ubuntu 24.04 LTS and newer provides a solid foundation, but many users struggle to find the correct settings to fully activate a system-wide dark appearance. Learning how to enable and customize Ubuntu dark theme properly ensures visual consistency across your desktop, terminal, and development tools while reducing fatigue during extended infrastructure work.

GNOME SettingsStyle: Light / DarkAccent Color PickerGNOME TweaksLegacy Apps (GTK3)Shell Themes & FontsGSettings / dconfTerminal ProfilesApp-Specific OverridesUnified Dark WorkspaceConsistent colors across GTK4, GTK3, Terminal & IDEEnable and Customize Ubuntu Dark Theme Architecture
Three-layer approach to enable and customize Ubuntu dark theme: system settings, legacy tweaks, and application-specific configuration.

How do you enable and customize Ubuntu dark theme via system settings?

Ubuntu 24.04 LTS and later ship with a refined GNOME desktop that separates modern GTK4/libadwaita applications from legacy GTK3 software. The primary control for dark mode lives in the native Settings application, which handles the global color scheme preference signal sent to compliant applications. This is always your starting point before installing additional tools or editing configuration files manually.

Switching to dark style

  1. Open Settings from the application grid or press Super + I.
  2. Navigate to Appearance in the left sidebar.
  3. Under the Style section, click the Dark option.
  4. Select an Accent Color if desired — this affects window controls, selection highlights, and toggle switches in supported apps.

This change takes effect immediately for all libadwaita and GTK4 applications such as Files (Nautilus), Text Editor, and Settings itself. The system broadcasts the org.gnome.desktop.interface.color-scheme key to prefer-dark, which well-maintained applications detect automatically. If you manage multiple machines via Ansible or cloud-init, you can set this declaratively rather than clicking through the GUI on each host.

'# Set dark mode via CLI for automation scripts
gsettings set org.gnome.desktop.interface color-scheme prefer-dark

'# Verify the current setting
gsettings get org.gnome.desktop.interface color-scheme

A common mistake is assuming this single toggle makes every application dark. It does not. Legacy GTK3 apps, Electron-based tools like VS Code, and terminal emulators maintain their own theme preferences. You must address these layers separately to achieve true visual consistency, especially when building a professional development environment where context-switching between jarring light and dark interfaces breaks focus.

Why don't legacy GTK3 applications follow the system dark mode?

GNOME's transition to libadwaita created a split in the theming ecosystem. Modern GTK4 apps use the new color-scheme API, while older GTK3 applications still rely on the traditional gtk-theme-name setting. Without intervention, apps like GIMP, Inkscape, KeePassXC, and many database clients will remain light even after you enable system dark mode. This inconsistency is the most frequent pain point engineers encounter when they first try to enable and customize Ubuntu dark theme comprehensively.

Installing and configuring GNOME Tweaks

GNOME Tweaks bridges this gap by exposing legacy theming controls that the simplified Settings app intentionally hides. Install it from the official repositories:

sudo apt update
sudo apt install gnome-tweaks -y

After installation, launch Tweaks and navigate to Appearance > Legacy Applications. Select Yaru-dark (or another installed dark GTK3 theme) from the dropdown. This forces GTK3 applications to render with dark styling regardless of the system color-scheme preference. For teams standardizing workstation configurations, consider documenting this step in your onboarding wiki or automating it via configuration management.

If you need additional themes beyond Yaru, the gnome-themes-extra package provides Adwaita-dark, and community themes like Arc-Dark or Dracula are available via PPA or manual installation. Always verify theme compatibility with your Ubuntu version — themes built for 22.04 may have rendering glitches on 24.04 due to GTK minor version differences.

How do you configure the terminal to match the Ubuntu dark theme?

The terminal is where DevOps engineers spend the majority of their time, yet it operates independently of the GNOME color-scheme API. GNOME Terminal uses named profiles with their own foreground, background, and palette definitions. Leaving it on the default light profile while the rest of your desktop is dark creates unnecessary visual friction every time you switch contexts. Properly configuring your terminal is essential when you enable and customize Ubuntu dark theme for productive infrastructure work.

Creating a dedicated dark terminal profile

  1. Open GNOME Terminal and go to Hamburger Menu > Preferences.
  2. Click Add Profile and name it "Dark-Dev" or similar.
  3. Set Background to a solid dark color (#1e1e1e or #0d1117 work well).
  4. Set Foreground to a high-contrast light color (#d4d4d4 or #c9d1d9).
  5. Choose a Built-in Scheme like "Tango Dark" or import a custom palette matching your IDE.
  6. Enable Use transparent background at 90-95% opacity for subtle depth without sacrificing readability.
  7. Set this profile as Default under the General tab.
'# Export your terminal profile for backup or team sharing
dconf dump /org/gnome/terminal/legacy/profiles:/ > terminal-profiles-backup.dconf

'# Restore on a new machine
dconf load /org/gnome/terminal/legacy/profiles:/ < terminal-profiles-backup.dconf

For engineers who frequently SSH into remote servers or manage containers, consider setting distinct background tints per profile — perhaps slightly blue for production hosts and green for staging. This provides instant visual feedback about which environment you're operating in, reducing the risk of accidental changes. Pair this with proper SSH hardening practices to ensure your secure connections also look intentional and organized.

1. Open PrefsMenu > Preferences2. Add ProfileName: Dark-Dev3. Set ColorsBG: #1e1e1e FG: #d4d4d44. Set DefaultGeneral > Default Profile$ ssh prod-web-01Connected to prod-web-01 (10.0.1.50)ubuntu@prod-web-01:~$ htopResult: Consistent dark terminal matching system theme for reduced eye strain
Terminal dark theme configuration workflow: create profile, set colors, apply as default, and verify consistency.

Which dark theme method works best for different Ubuntu versions?

Ubuntu's theming capabilities have evolved significantly across recent LTS releases. Understanding these differences prevents wasted effort when following outdated tutorials or applying settings that no longer exist. The table below compares approaches across versions commonly found in production and development environments today.

FeatureUbuntu 22.04 LTSUbuntu 24.04 LTSUbuntu 26.04 LTS (2026)
System Dark ToggleSettings > AppearanceSettings > Appearance + Accent ColorsEnhanced accent customization + auto-schedule
Legacy App ThemingGNOME Tweaks requiredGNOME Tweaks requiredImproved GTK3 compatibility layer
Accent Color SupportLimited (Yaru only)10 built-in accent colorsCustom hex accent via GSettings
Auto Dark/Light ScheduleRequires extensionRequires extensionNative sunrise/sunset scheduling
Flatpak Theme SyncManual override neededBetter automatic detectionFull portal integration
Recommended ToolGNOME Tweaks + gsettingsSettings + Tweaks comboNative Settings sufficient for most

If you're running 22.04 in production and cannot upgrade, expect to rely heavily on GNOME Tweaks and manual GSettings overrides. Teams planning migrations should note that 24.04+ reduces friction substantially, making standardized dark theme deployment more reliable across fleet machines. For those evaluating newer releases, our comparison of cloud platforms in 2026 includes notes on Ubuntu version availability across major providers.

How do you troubleshoot dark theme issues in Ubuntu?

Even with correct configuration, you'll encounter applications that refuse to adopt dark styling or display broken contrast ratios. Systematic troubleshooting saves hours of random forum searching. Start by identifying whether the problem affects GTK4, GTK3, or non-GTK applications, as each has different remediation paths.

Diagnosing theme application failures

  • Check the color-scheme key: Run gsettings get org.gnome.desktop.interface color-scheme. If it returns default instead of prefer-dark, the system toggle didn't persist. Reapply via CLI.
  • Verify GTK3 theme: In GNOME Tweaks, confirm Legacy Applications shows a dark variant. If greyed out, reinstall gnome-themes-extra and yaru-theme-gtk.
  • Test with GTK_DEBUG: Launch problematic apps with GTK_DEBUG=interactive app-name to inspect which CSS nodes are overriding your theme.
  • Flatpak overrides: Flatpak apps sandbox theme access. Grant permissions via flatpak override --user --filesystem=xdg-config/gtk-3.0:ro or use Flatseal GUI.
  • Electron apps: VS Code, Slack, and Discord ignore GTK themes entirely. Use their internal settings or launch flags like --force-dark-mode.
'# Reset all theme-related settings to clean state
gsettings reset org.gnome.desktop.interface color-scheme
gsettings reset org.gnome.desktop.interface gtk-theme
gsettings reset org.gnome.shell.extensions.user-theme name

'# Reinstall core theme packages if corrupted
sudo apt install --reinstall yaru-theme-gtk yaru-theme-icon gnome-themes-extra

When supporting remote teams or Nepal-based developers working across varying hardware, remember that GPU drivers can affect theme rendering. NVIDIA proprietary drivers sometimes cause flickering or incomplete dark mode application in GNOME Shell. Switching to the open-source Nouveau driver temporarily isolates whether the issue is driver-related. Document these edge cases in your team's runbook alongside your server hardening procedures for comprehensive workstation standards.

App Not Dark?Identify Toolkit: GTK4 / GTK3 / OtherGTK4 / libadwaitaCheck color-scheme keyReset + reapply toggleVerify Flatpak portalsGTK3 LegacyGNOME Tweaks > LegacyInstall yaru-theme-gtkReinstall if greyed outNon-GTK AppsElectron: --force-dark-modeQt: QT_STYLE_OVERRIDECheck GPU driversStill Broken? → GTK_DEBUG=interactive + File Bug Report
Troubleshooting decision tree for enabling and customizing Ubuntu dark theme when applications fail to adopt dark styling.

Final recommendations for a consistent dark workspace

A properly configured dark environment reduces cognitive load during long debugging sessions and overnight incident response. The key to success when you enable and customize Ubuntu dark theme is treating it as a layered system rather than a single toggle: system settings for modern apps, GNOME Tweaks for legacy software, and application-specific profiles for terminals and IDEs. Automate what you can via GSettings and configuration management, document exceptions for your team, and test across the actual applications your workflow depends on rather than assuming universal compliance.

If you're setting up development workstations for a team or need help standardizing desktop environments alongside your cloud infrastructure, reach out to discuss your requirements. Consistent, ergonomic tooling is foundational to sustainable engineering velocity.

Frequently Asked Questions

Open Settings, navigate to Appearance, and select Dark under Style. This changes the shell and GTK4 applications immediately without requiring a system restart or additional terminal commands.

Yes. Install gnome-tweaks and set Legacy Applications to Adwaita-dark. Some older apps may still ignore this setting if they use custom styling engines or hardcoded light palettes that override system preferences.

Yes, significantly. Black pixels turn off completely on OLED panels, reducing display power draw by up to thirty percent compared to white backgrounds during typical desktop workflows in 2026.

Firefox uses its own color scheme detection. Go to Settings, General, Language and Appearance, then set Theme to System Default. Ensure website appearance is also set to Automatic to respect prefers-color-scheme media queries.

Download the theme from Gnome-Look, extract to ~/.local/share/themes, then apply via gnome-tweaks. Verify the archive contains gtk-3.0 and gtk-4.0 folders for full compatibility with current Ubuntu versions.

Run gsettings set org.gnome.desktop.interface color-scheme prefer-dark. This modifies the dconf database directly and takes effect immediately for new sessions, making it ideal for Ansible playbooks or post-install setup scripts.

The active icon theme lacks dark variants. Switch to Papirus-Dark or Yaru-dark via gnome-tweaks. These packs include specifically designed high-contrast assets optimized for dark shells and panels in modern GNOME environments.

Yes. Install the Night Theme Switcher extension from extensions.gnome.org. Configure sunrise and sunset times or custom schedules to toggle color-scheme and legacy application themes automatically based on your local timezone.

Install qt5-style-plugins and set QT_QPA_PLATFORMTHEME=gtk3 in /etc/environment. This forces Qt5 apps to inherit GTK styling. For Qt6 apps in 2026, ensure libqt6xdgplatformtheme1 is installed and configured correctly.

Screenshots capture exactly what renders on screen. If documenting for mixed audiences, consider using a neutral theme or adding borders. Automated testing tools should account for both color schemes when validating UI element visibility.

Negligible on modern hardware. Theme rendering occurs during widget initialization, not per-frame. However, poorly optimized SVG assets in third-party themes can increase memory usage slightly during file manager navigation operations.

Execute gsettings reset-recursively org.gnome.desktop.interface followed by selecting Yaru-dark in Settings. Remove any conflicting entries in ~/.config/gtk-3.0/settings.ini to eliminate residual overrides causing visual inconsistencies.

Flatpaks sandboxed by default cannot read host themes. Install org.gtk.Gtk3theme.Yaru-dark and org.gtk.Gtk4theme.Yaru-dark via Flatpak to grant access. Portal integration in 2026 handles most cases automatically but manual installs remain necessary for edge cases.

Use gtk-theme-config or the Theme Preview feature in gnome-tweaks. Alternatively, launch specific apps with GTK_THEME=Adwaita:dark app-command to test rendering without modifying global settings or risking session instability.

Yes. WCAG 2.2 requires minimum 4.5:1 contrast ratio for text. Many aesthetic dark themes fail this standard. Always verify contrast using tools like Contrast Checker before deploying custom themes in production or shared environments.