VirtualBox on Arch Linux does not have a native "Dark Mode" toggle in its settings because it relies on the system’s GTK theme. To enable dark mode, you must install and activate a dark GTK theme like Adwaita-dark or Greybird. VirtualBox automatically inherits this theme upon restart, providing a consistent dark interface without requiring complex configuration files or hacks.
Understanding VirtualBox Theming on Linux
Unlike Windows or macOS versions of VirtualBox, which may have built-in appearance options, the Linux version is tightly integrated with the desktop environment’s toolkit. Specifically, VirtualBox uses the GTK (GIMP Toolkit) library for its graphical user interface. This means that VirtualBox does not manage its own colors independently; instead, it queries the current GTK theme applied to your Arch Linux system. If your system is using a light theme, VirtualBox will appear bright. If you switch to a dark GTK theme, VirtualBox will instantly reflect those changes. This dependency simplifies the process significantly. You do not need to edit hidden configuration files, use command-line flags to force color schemes, or modify internal XML descriptors. The solution lies entirely in managing your host OS’s visual style. For users who frequently switch between work and creative tasks, having a unified dark interface across all applications, including virtual machines, reduces eye strain and provides a cohesive look.Installing Dark GTK Themes on Arch Linux
Arch Linux offers a vast repository of themes through the Arch User Repository (AUR) and official packages. The most straightforward approach is to install a well-maintained dark theme. Two popular choices areadwaita-dark, which is part of the GNOME ecosystem, and greybird-gtk-theme, which is highly customizable and widely used across various desktop environments like KDE Plasma and XFCE.
To install adwaita-dark, you can use your package manager if it is available in your configured repositories. However, many users prefer AUR helpers like yay or paru for broader access. For example, running yay -S adwaita-dark will fetch and compile the necessary assets. Alternatively, for greybird, you might run yay -S greybird-gtk-theme. These packages place the theme files in standard directories such as /usr/share/themes or ~/.themes, making them immediately discoverable by any GTK application.
If you choose to download themes manually from sites like GNOME Look, ensure you extract them into your local ~/.themes directory. This location takes precedence over system-wide installations for the current user. After installation, verify that the theme files contain the necessary CSS definitions for dark backgrounds and light text. Most modern themes include these out of the box, but older or poorly maintained ones might require manual tweaking.
Applying the Theme via Your Desktop Environment
Once the theme is installed, you must apply it to your system. The method depends on which desktop environment (DE) you are using on Arch Linux. For GNOME users, open the Tweaks application. Navigate to the Appearance tab. Under the Applications dropdown menu, select your newly installed dark theme (e.g., Adwaita-dark). GNOME applies this setting globally, affecting all GTK3 and GTK4 applications. For KDE Plasma users, go to System Settings, then select Appearance > Colors. Choose a dark color scheme, and under the Window Decorations and Taskbar sections, ensure consistency. KDE also allows you to set the global application style to Breeze or Oxy, but ensuring the color palette is dark is key for VirtualBox. For XFCE or MATE users, open the Settings Manager, find Appearance, and select the Style tab. Choose the dark theme from the list. XFCE may require logging out and back in for some applications to fully pick up the new theme variables. After applying the theme, close VirtualBox completely. It is crucial to exit the application so that it releases any cached graphical resources. Then, reopen VirtualBox. You should see the main window, the device manager, and the console windows rendered in dark colors. If VirtualBox still appears light, check if your DE has overridden the GTK theme specifically for certain apps or if there is a conflict with other styling tools.Handling Specific UI Elements
Sometimes, while the main window turns dark, specific dialogs or the VM console might retain light backgrounds. This is often due to how individual components within VirtualBox handle inheritance. The console window, which displays the guest OS output, typically follows the system terminal settings rather than the GTK theme. If you want the console background to be dark, ensure your default terminal emulator (likekitty, alacritty, or gnome-terminal) is also using a dark profile.
Additionally, some icons or buttons might not scale perfectly with every dark theme. If you encounter visual glitches where icons disappear against dark backgrounds, consider switching to a theme that includes icon packs designed for dark modes, such as Vimix-icon-theme paired with a dark GTK theme. This ensures that white icons remain visible on dark panels.
For advanced users who wish to fine-tune the appearance further, you can create a custom gtk.css file in ~/.config/gtk-3.0/. This file allows you to override specific properties for VirtualBox alone. However, this is rarely necessary since most complete themes handle the application correctly. Start with a simple theme swap before resorting to custom CSS overrides.
Verifying the Change
To confirm that VirtualBox is correctly using the dark theme, inspect the main menu bar and the side panel listing your virtual machines. These areas should now have dark backgrounds with light text. If you have multiple VMs, notice how the selection highlight matches the theme’s accent color. This visual consistency extends to error dialogs and warning messages, which will also adopt the dark aesthetic. Remember that updates to VirtualBox or your GTK libraries might occasionally reset preferences or introduce bugs. If the dark mode stops working after an update, reapply the theme in your DE settings. In rare cases, clearing the GTK cache by deleting~/.cache/gtk-3.0/ can resolve rendering issues.
Frequently Asked Questions
Does VirtualBox support custom color schemes natively?
No, VirtualBox on Linux does not have a built-in settings menu for changing colors. It strictly relies on the GTK theme provided by your operating system. Any customization must be done at the system level by installing and activating different GTK themes.
Why is only part of VirtualBox dark after I change my theme?
This usually happens because some components, like the VM console, inherit settings from your terminal emulator rather than the GTK theme. Ensure your default terminal app is also set to a dark profile to achieve full consistency across the interface.
Can I use a dark theme without changing my entire system?
Most desktop environments allow per-application styling, but VirtualBox generally follows the global GTK theme. While you can sometimes force a theme via environment variables, it is more reliable to simply switch your global theme to a dark variant temporarily.
Will updating Arch Linux break my VirtualBox dark mode?
Updates rarely break theme compatibility, but they might reset your DE settings if you use a display manager that saves state differently. If VirtualBox reverts to light mode, simply reselect the dark theme in your Appearance settings to restore the look.
Is there a way to make VirtualBox look like macOS dark mode on Linux?
You can approximate this by installing a macOS-inspired GTK theme, such as WhiteSur-gtk-theme or McMojave-circle. Apply the dark variant of these themes in your DE settings to get a closer visual match to Apple’s design language.