How can I change the icon for a binary file on my desktop?
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!
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