How can I change the icon for a binary file on my desktop?

5,869

Solution 1

You must be talking about a .desktop file? open it with gedit, find the Icon= line and change the icon to what you want it to be.

Or, the GUI way: right click on the .desktop file > properties > click on the icon and browse to another icon.

By the way, you need to make it executable to have it work from the desktop!

Solution 2

How to change the icon of a Unity Launcher (12.04 or above):

Unity Launchers are files stored in your computer, with a .desktop extension. These files are used to launch a specific application, but in Unity they are also used so as to create right-click menus for each application, which you can access from the Unity Launcher.

Such file looks something like this:

[Desktop Entry]
Version=x.y
Name=ProgramName
Comment=This is my comment
Exec=/home/$USER/Documents/exec.sh
Icon=/home/$USER/Pictures/icon.png
Terminal=false
Type=Application
Categories=Utility;Application;

Icon field is the icon that should be used by the launcher and represents the application. All icons that are under the directory /usr/share/pixmaps don't need to have their full path specified, but their filename without the extension.

For example, if the icon file is /usr/share/pixmaps/wallch.png, then the Icon field should be just wallch. All other icons should have their full path specified.


Therefore, in order to change the icon for a specific program, you need to:

1. Find the related .desktop file, they are commonly under /usr/share/....

You can do so with:

locate program_name.desktop

or if you can't seem to find it:

locate *.desktop

and scroll through the list.

2. Open the .desktop you want to modify:

gedit /path/to/program_name.desktop

3. Modify any of the fields you wish:

Just to be save, make a backup first, which you can replace for the original file in case you screw up:

cp /path/to/program_name.desktop /path/to/program_name_backup

Source and further information:

https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles

Share:
5,869

Related videos on Youtube

Farooq
Author by

Farooq

Updated on September 18, 2022

Comments

  • Farooq
    Farooq over 1 year

    I want to change icon of a binary file which is placed on my desktop. The binary file is related to unetbootin. I want to execute unetbootin from the desktop so I want to change the icon.

    How can I achieve this?

  • Farooq
    Farooq about 10 years
    where i can find .desktop file?
  • Jacob Vlijm
    Jacob Vlijm about 10 years
    @Farooq Aha, I see, I thought you already had it on your desktop. If not, go to /usr/share/applications practically every application is represented there by a .desktop file. search for the Unetbootin file and copy it to your desktop (right click > copy, on your desktop right click > paste). Then make it executable and do as described in the answer.