Ubuntu Theme Installation
Introduction
Customizing your Ubuntu desktop is a great way to make your computing environment more personal and productive. One of the most impactful ways to change the look and feel of Ubuntu is by installing custom themes. In this guide, we'll explore how to install, apply, and customize themes in Ubuntu, focusing on the GNOME desktop environment that comes with recent Ubuntu versions.
Themes in Ubuntu can modify various visual elements:
- Window borders and controls
- Icons
- Cursors
- Desktop backgrounds
- Color schemes
By the end of this guide, you'll understand how to transform your Ubuntu desktop's appearance to suit your preferences.
Prerequisites
Before we begin, make sure you have:
- Ubuntu 20.04 or newer
- Basic knowledge of terminal commands
- An internet connection to download themes
Understanding Theme Components in Ubuntu
In the GNOME desktop environment used by Ubuntu, themes are divided into several components:
- GTK Themes: Control the appearance of application windows, buttons, and menus
- Icon Themes: Define the look of file, folder, and application icons
- Cursor Themes: Change how your mouse pointer appears
- Shell Themes: Modify the appearance of the GNOME Shell (top bar, Activities overview, etc.)
Let's look at how to install and apply each of these components.
Installing Theme Tools
First, let's install some essential tools for theme management:
sudo apt update
sudo apt install gnome-tweaks gnome-shell-extensions
The gnome-tweaks
tool provides a user-friendly interface for applying themes, while gnome-shell-extensions
enables additional customization options.
After installation, you need to install the User Themes extension:
- Open Firefox and go to https://extensions.gnome.org/
- Search for "User Themes" and toggle it to ON
- You might need to install the browser extension if prompted
This extension allows you to change the GNOME Shell theme.
Method 1: Installing Themes from Official Repositories
The easiest way to install themes is through Ubuntu's repositories:
sudo apt update
sudo apt install arc-theme papirus-icon-theme
This command installs the popular Arc GTK theme and Papirus icon theme.
Method 2: Installing Themes Manually
For themes not available in the repositories, follow these steps:
- Create theme directories if they don't exist:
mkdir -p ~/.themes ~/.icons
- Download your desired theme (we'll use Materia theme as an example):
cd ~/Downloads
git clone https://github.com/nana-4/materia-theme.git
cd materia-theme
- Install the theme:
./install.sh
For themes without an install script, you can simply extract the theme to the proper directory:
# For GTK themes
tar xf theme-name.tar.xz -C ~/.themes/
# For icon themes
tar xf icon-theme.tar.xz -C ~/.icons/
Method 3: Using the Pling Store (Formerly GNOME Look)
The Pling Store provides a graphical interface for installing themes:
- Install the Pling Store:
sudo apt install flatpak
flatpak install flathub org.kde.KStyle.Kvantum
flatpak install flathub org.kde.pling-store
- Launch the Pling Store and browse for themes, icons, and more
- Click the "Install" button to automatically install the theme
Applying Themes
Using GNOME Tweaks
- Open GNOME Tweaks from the Applications menu or run:
gnome-tweaks
- Navigate to the "Appearance" tab
- Select your preferred themes:
- Under "Themes" > "Applications" - choose your GTK theme
- Under "Themes" > "Cursor" - choose your cursor theme
- Under "Themes" > "Icons" - choose your icon theme
- Under "Themes" > "Shell" - choose your GNOME Shell theme (requires User Themes extension)
Using the Command Line
For GTK theme:
gsettings set org.gnome.desktop.interface gtk-theme "Materia-dark"
For icon theme:
gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark"
For cursor theme:
gsettings set org.gnome.desktop.interface cursor-theme "Breeze_Snow"
Customizing Individual Theme Components
Customizing GTK Themes
GTK themes can be customized by editing their CSS files:
- Locate your theme's directory (either in
/usr/share/themes/
or~/.themes/
) - Navigate to the
gtk-3.0
orgtk-4.0
directory - Create a backup of the
gtk.css
file:
cp ~/.themes/Materia-dark/gtk-3.0/gtk.css ~/.themes/Materia-dark/gtk-3.0/gtk.css.backup
- Edit the CSS file with your preferred text editor:
nano ~/.themes/Materia-dark/gtk-3.0/gtk.css
- Make your changes and save the file
- Log out and log back in to apply the changes
Here's an example of modifying the button color in a theme:
button {
background-color: #3498db;
color: #ffffff;
border-radius: 4px;
padding: 6px;
}
button:hover {
background-color: #2980b9;
}
Creating Color Variants
You can also create color variants of existing themes:
- Copy an existing theme:
cp -r ~/.themes/Materia ~/.themes/Materia-Custom
- Find and edit the color definitions in CSS files using find:
find ~/.themes/Materia-Custom -name "*.css" | xargs sed -i 's/#3498db/#e74c3c/g'
This command replaces the blue color (#3498db) with red (#e74c3c).
Working with Icon Themes
Mixing Icon Sets
You can combine elements from different icon themes:
- Create a new icon theme folder:
mkdir -p ~/.icons/Mixed-Icons/apps/scalable
- Create an
index.theme
file:
nano ~/.icons/Mixed-Icons/index.theme
- Add the following content:
[Icon Theme]
Name=Mixed Icons
Comment=A mix of my favorite icon sets
Inherits=Papirus,Numix-Circle
- Copy specific icons from other themes or download individual icons
Testing Icon Changes
To see immediately if your icon changes worked, refresh the icon cache:
gtk-update-icon-cache -f ~/.icons/Mixed-Icons
Troubleshooting Common Theme Issues
Theme Not Applying Correctly
If your theme isn't applying properly:
- Check if the theme is compatible with your Ubuntu version
- Ensure the theme structure is correct (use
ls -la
to check directories) - Try restarting the GNOME Shell:
- Press Alt+F2
- Type
r
and press Enter
Missing Theme Elements
If parts of your theme are missing:
- Check if you need additional components:
ls -la ~/.themes/ThemeName/
Look for directories like gnome-shell
, gtk-3.0
, and gtk-4.0
.
- Install missing components or try a different theme
Permissions Issues
If you encounter permission errors:
sudo chown -R $USER:$USER ~/.themes ~/.icons
sudo chmod -R 755 ~/.themes ~/.icons
Advanced: Creating Your Own Theme
While creating a complete theme is beyond the scope of this guide, you can start by:
- Copy an existing theme as a base:
cp -r /usr/share/themes/Adwaita ~/.themes/MyTheme
- Edit the theme's CSS files to make changes
- Test your changes incrementally
The theme structure typically looks like:
MyTheme/
├── gnome-shell/
│ └── gnome-shell.css
├── gtk-3.0/
│ └── gtk.css
├── gtk-4.0/
│ └── gtk.css
└── index.theme
Recommended Themes for Beginners
Here are some popular themes to get you started:
- Arc Theme: Clean, modern theme with light and dark variants
- Papirus Icons: Colorful, modern icon set with good app coverage
- Materia: Material design-inspired theme with good contrast
- Yaru: Ubuntu's default theme - try the community variants
- Nordic: Dark theme with blue accents
Summary
In this guide, we've covered how to:
- Install theme management tools
- Install themes from different sources
- Apply themes using GNOME Tweaks and command line
- Customize theme components
- Troubleshoot common theme issues
Theme installation in Ubuntu is a powerful way to personalize your desktop environment. By following these steps, you can transform your desktop to match your workflow preferences and aesthetic taste.
Additional Resources
- GNOME Look: The largest collection of themes for GNOME
- GNOME Wiki: Theme Development: Learn more about GTK theme development
- Ubuntu Forums Theming Section: Get help and share your themes
Exercises
- Install and apply three different themes and compare their appearances
- Create a custom color variant of your favorite theme
- Mix elements from different themes to create your unique desktop look
- Write a short script that can switch between your favorite themes with a single command
If you spot any mistakes on this website, please let me know at [email protected]. I’d greatly appreciate your feedback! :)