How To: Custom Icon Themes [Ubuntu]

How To: Custom Icon Themes [Ubuntu]

I’ve read many posts where folks want to use a custom icon for an application or apply an icon to an app that currently doesn’t have an icon tied to it and decided to share my solution and hopefully help someone else. This article is ported from Ubuntu Forums to preserve and update the data.

Preparation:

  • d/l at least one icon theme from gnome-look.org and install it.
  • Install the Icon Theme
  • I recommend viewing: This Icon Themes Tutorial to familiarize yourself with how icon themes work and how they call upon icons when changing themes.

Notes:

  • Tested and works on Gnome 2.14.3 +; Dapper +
  • If running gdesklets, you’ll have to manually alter those icons. gdesklets doesn’t conform to the current theme.

 

Step 1


  • Open your Home folder, press ctrl-h (to expose hidden folders/files), navigate to .icons folder. Inside the .icons folder will be the installed theme(s).
  • Right-click and copy one of the theme folders and paste it to your desktop.
  • Rename the folder, for this how to I will use <Myicons>.
  • Right-click and cut the folder from the desktop and paste it back into the .icons folder.

 

Step 2


  • Open a terminal window.
  • Type the following code:

gedit .icons/Myicons/index.theme (Reminder: case sensitive)
 

Step 3


  • At the top of the file are generic terms:

[Icon Theme] Name=<themename> --> This is the theme name that will be displayed in Theme Manager. This name needs to match exactly to the theme folder name.
Comments=<theme comment> --> Use as a simple descriptor.
Inherits=<root theme> --> This is used if an icon is not supplied by the current theme.

  • Edit the file to match as follows:

[Icon Theme] Name=Myicons
Comment=Myicons Custom
Inherits=gnome

  • Save and exit.

You have now told the file to display the Myicons name in the Theme Manager and to read from the root gnome icons if an icon is not supplied with this theme. If you open Theme Manager, you will now see the choice of Myicons under the icons tab.

Within the Myicons folder are subfolders showing which icons are supplied and what type. For example, many icon themes have a gaim replacement icon located under the apps subfolder. Some icons are placed in alternate folders depending upon the theme and artist.

 

Step 4


Replace/Add icons based on the app/device/place/etc. You now have a custom icon folder. If you have specific icons locate them or icon themes install them. For this step I will use 2 examples:

Example A: We want to replace the gaim icon.

  • Navigate to the apps subfolder in the Myicons theme folder as well as in <Alternate theme 1>.
  • Rename gaim.* to gaim-OLD.* in Myicons/<subfolder>/apps.
  • Copy the gaim.* icon from <Alternate theme 1> and paste it into the Myicons/<subfolder>/apps folder.  Note: <subfolder> usually refers to <scalable>. If <scalable> isn’t available choose the highest resolution folder, ie <128×128>.

 

Example B: We want to replace the ubuntu logo located next to the applications menu.

  • Choose the icon you want to use as the replacement.
  • Rename it to distributor-logo.*
  • Copy/paste it to Myicons/<subfolder>/apps.

Note: This example doesn’t call for a rename and replacement setup b/c I’ve personally never seen a theme that comes with a replacement for that icon. I mainly used this example b/c I’ve seen several posts looking for a quick fix for replacing the ubuntu logo.

 

Step 5 (optional)


  • Reload the desktop. Logout/Login or open a terminal window and type:

killall gnome-panel or killall kicker

  • The icons should now be replaced.

 

Advanced Tip


If you have multiple icon themes installed and you are fond of some more than others or more than

the root gnome icons, then edit the index.theme file to merge them.

From a Terminal window type:
gedit .icons/Myicons/index.theme

Alter the Inherits line to look like this:
Inherits=<MoreIcons>, gnome
<MoreIcons> is the name of an alternate theme. That will force your Myicons theme to read from <MoreIcons> first and then read from the root gnome icons if an icon isn’t supplied.

That’s about it I hope I described the process simply and directly in a way that is understandable. If anyone notices any discrepancies, please let me know.

If you enjoyed or found this article useful, please show us some support by liking us on Facebook or by sharing us on your favorite social website. Thanks!


One Response

  1. custom icon says:

    the step by step explanation is so good and understandable
    thanks for sharing
    and keep on posting like this

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>