Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to change the icon image of the executable files from the command line. I'm using KDE. Can any one help me in this regard.

share|improve this question
This might prove to be DE-specific. What's your desktop? – alex Feb 15 '11 at 6:00
i am using KDE. – pratap Feb 15 '11 at 6:18
I do not believe "executables" have icons, but I could be wrong. Generally this is faked with various .ini files. – Kent Fredric Feb 15 '11 at 6:45
What version of KDE? The answer may be different for KDE 3 and 4. – Gilles Feb 15 '11 at 8:33

In KDE4 you have to create file ~/.local/share/mime/packages/application-x-executable.xml with such content:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/x-executable">
        <icon name="application-x-executable"/>

Then you can change the icon name value to something built-in like "emblem-favorite" or specify the full path: "/home/my_user/my_ico/my_exec.png". After saving the file, run update-mime-database ~/.local/share/mime/. The changes will apply almost immidiately.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.