How to change the icon of your application from the terminal on Linux

Previously, we showed you how to easily change the application icons in Gnome 3. However, some users still prefer to use their terminal for this. It’s doable, but, as expected, the process is a little more complicated than a few mouse clicks. Let’s see how to change the icon of your application directly from your terminal.

Find your application’s desktop settings

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, operate, and look on the desktop. Among these, you can find a value for its icon.

Launch your preferred terminal and access the folder where you will find these settings files for all your applications, with:

Note that, depending on your distribution, this path may be different.

Change Cd terminal icons to folder

This folder can contain hundreds of entries. To find your way among them and locate the application you want to modify, use grep to filter the list. We wanted to verify the existence of a settings file for Firefox, so we used:

Change Terminal Grep program iconsChange Terminal Grep program icons

Open the settings file in your favorite text editor – we used nano. The “/ usr / share / applications” folder being provided with restricted access, you will have to run your editor with sudo to edit any file. Our command was:

Changing the icons of the Sudo Nano terminalChanging the icons of the Sudo Nano terminal

Swap icon

With the file open in your editor, it’s time to change the application icon. If you don’t have an alternative icon yet, it’s time to find one. Exit your editor window and spend a moment on your favorite browser.

Change the Nano terminal settings iconsChange the Nano terminal settings icons

Look for a free icon in PNG or JPG format. We used the query “firefox icon png” and went to get the first result that appeared.

Change Firefox terminal icons New iconChange Firefox terminal icons New icon

Save the file locally in a relatively simple path. Make sure you remember the path and file name, as you will need it soon. Our full path and file name is “/home/USERNAME/Pictures/icons/black_firefox.png”.

Change terminal download icons locallyChange terminal download icons locally

Return to your editor and search for the channel icon.

Change the channel search icons for the terminalChange the channel search icons for the terminal

Change Icon=CURRENT_ICON to point to the file you just downloaded. In our case, the original entry was read Icon=firefox.

Change the icons of the value of the original icon of the terminalChange the icons of the value of the original icon of the terminal

The updated version was:

Change the icons of the updated terminal icon valueChange the icons of the updated terminal icon value

Save and update

Save the changes (Ctrl + O), quit your editor (Ctrl + X), and wait. The next time your desktop is updated, your app icon will do the same.

Change terminal icons New icon on the desktopChange terminal icons New icon on the desktop

If it takes too long, you still have the option of logging out and then logging back in to force a full refresh.

Change terminal logout iconsChange terminal logout icons

You can repeat the process for the rest of your applications to give your desktop a truly unique and personal look.

READ:   The best Chrome security extensions to improve your browsing security

Now that you’ve changed the application icon from the terminal, it’s also possible to manage your tasks or even search the web from the terminal. And if your terminal is not working, try these fixes.

Related:

Is this article useful?

!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,’script’,
‘https://connect.facebook.net/en_US/fbevents.js’);
fbq(‘init’, ‘400239050508508’);
fbq(‘track’, ‘PageView’);

Leave a Reply