How to Install a Linux Theme in 5 Simple Steps

Robert Washbourne - 3 years ago - themes, gnome

For a new linux user, installing themes can be confusing. You might find a great theme, but be unable to add it to your system because the install directions are confusing, or the theme might offer only files, but no installation directions. This comprehensive guide will help you take those themes and make them yours.

This guide aims to be universal for all desktop environments. If you find an error for your DE, please tell me in the comments, or suggest an alternative solution.

1. Identify your desktop environment

You need this later to find if your theme supports your system.
First, open a terminal by either

  • Right clicking on the desktop and selecting open terminal
  • Searching for the terminal in your dash
  • Ctrl + Alt + T
echo $DESKTOP_SESSION

Inside the terminal window, copy the command above and press Ctrl + Shift + V to paste.

2. Check if the theme supports your system

Skip this step if the download area does not include info.

Inside the theme info, the maintainer usually has info on the desktops it supports. Here is an example from the Adapta theme:

Light/Dark variant Gtk+ 3.22/3.20/3.18 theme
Light/Dark variant Budgie-Desktop theme
Light variant Gtk+ 2.0 theme
Light variant Gnome-Shell theme
Light variant Cinnamon theme

If the theme does not include the info inside the readme, you can check the files. Again, here is an example from the Adapta Github page:

WM means openbox based distros, shell means gnome-shell, and gtk is for gtk based desktops.

3. Find the download url of the theme

We find the url so that we can download through the terminal, which is preferred because you can download directly to the correct location. Here I include instructions for themes on Github and themes on Gnome Look, but in general just find the zipped file for your theme.

Gnome Look & general

Gnome look and from other locations such as Deviant Art.
Find the file download, right click, and copy. The example below is from Gnome Look:

Github release

Go to the Github page of the theme and look for a tab named releases. If the theme has releases, copy the download link (right click on the zip button).

Check for releases on the github page of the theme:
Check if there are any releases
Inside the releases page, find the latest release and copy the download link.

Save the download for the latest release
Right click the link and copy it.

Github without release

Right click and copy the url of the theme zip:
Download without releases

4. Download and unzip your theme

I will refer to the url you copied in step two as http://theme-url.zip.
Run these commands in your terminal (you can replace wget with curl if needed).

Download for your user

wget http://theme-url.zip -O ~/Downloads/theme.zip
unzip ~/Downloads/theme.zip -d ./themes

This downloads the theme only for your user. Does not require root.

Download for all users

wget http://theme-url.zip -O ~/Downloads/theme.zip
sudo unzip ~/Downloads/theme.zip -d /usr/share/themes/

This downloads the theme for all users. Requires root.

5. Refresh theme cache and enable theme

For you to be able to enable your new theme, you need to be able to see it. If your are in Gnome or Unity (default), run Alt + F2, type r, and hit enter. If this does not work for you, just restart your computer.

In Gnome or Unity, you can use the tweak tool to change themes.

Enable the theme with tweak tool

If you don't have it, install from the official repositories.

sudo apt-get install gnome-tweak-tool

Gnome

sudo apt-get install unity-tweak-tool

Unity


I have a lot of themes.

Enable the theme from your terminal

You can use this great script from the archbang wikis. (Open a text editor, save this as gtk3switch.sh, and run chmod +x gtk3switch.sh in the directory of the file. I modified this script slightly.)

!/bin/bash

# script to copy gtk-3.0 to ~/.config/
# by Mr Green & darktux
# gtk3switch version 0.2

# paths
user_home=/home/${USER}
theme_name=$@ # all arguments....
theme_dir=${user_home}/.themes
system_theme_dir=/usr/share/themes

if [ $# -eq 0 ]; then
		echo
		echo "Gtk3 themes"
		echo "==========="
		find ${system_theme_dir} ${theme_dir} -type d -name 'gtk-3.0' | awk -F'/' '{print $5}'
		echo 
		echo "To use one of above themes:"
		echo "./gtk3switch.sh <theme_name>"
    exit
fi

# Check if theme exists then copy it if it does
flag=0
for x in $system_theme_dir $theme_dir; do
	if [ -d ${x}/"${theme_name}"/gtk-3.0 ]; then
  	cp -a ${x}/"${theme_name}"/gtk-3.0 ${user_home}/.config
  	echo "Gtk3 theme ${theme_name} installed"
  	flag=1
	fi
done

# Theme not found
if [ "$flag" -eq 0 ]; then
  echo "Theme: ${theme_name} not found"
else
# Option to tweak theme with lxappearance (after theme instalation) 
  read -p "Tweak theme with Lxappearance ? (Y/n) " yn 
  case $yn in
    [Nn]* ) exit ;;
    * )   lxappearance ;;
  esac

fi
 
exit

How to use this script:

./gtk3switch.sh

List themes

./gtk3switch.sh <theme-name>

Use theme