Previously, we showed you how you can easily change app icons in Gnome 3. However, some users still prefer to use their terminal for that. It’s doable, but, as expected, the process is a bit more complicated than a few mouse clicks. Let’s examine how you can change your application icon directly from your terminal.
Find Your Application’s Desktop Parameters
Each application that appears on our desktop has a .desktop configuration file. This comes in the form of a text file, filled with values that define how it should act, work, and look on the desktop. Among those, you can find a value for its icon.
Fire up your favorite terminal and move to the folder where you will find those settings files for all your applications, with:
Note that, depending on your distribution, this path can be different.
This folder may contain hundreds of entries. To find your way among them and locate the application you want to tweak, use
grep to filter down the list. We wanted to check that a settings file for Firefox existed, so we used:
Open the settings file in your favorite text editor – we used nano. Since the folder “/usr/share/applications” comes with restricted access, you will have to run your editor with
sudo to edit any file. Our command was:
Swap the Icon
With the file open in your editor, it’s time to change the application’s icon. If you don’t already have an alternative icon, now’s the time to find one. Leave your editor window and jump for a while to your favorite browser.
Search for a free-to-use icon in either PNG or JPG format. We used the query “firefox icon png” and went for the first result that came up.
Save the file locally in a relatively simple path. Make sure to remember both the path and the filename, for you will need them soon. Our full path and filename is “/home/USERNAME/Pictures/icons/black_firefox.png”.
Move back to your editor and search for the string
Icon=CURRENT_ICON to point to the file you just downloaded. In our case, the original entry read
The updated version was:
Save and Refresh
Save the changes (Ctrl + O), exit your editor (Ctrl + X), and wait. The next time your desktop updates, so will your application’s icon.
If it takes too long, you always have the option of logging out and then logging back in to force a full refresh.
You can repeat the process for the rest of your applications to give your desktop a truly unique, personal look.
Now that you have changed the application icon from the terminal, it is also possible to manage your tasks or even search the Web from the terminal. And if your terminal is not working, try these fixes.