2

here is my desktop file. nautilus show icon and name i set in desktop file.

▶ cat gitauto.desktop 
[Desktop Entry]
Type=Application
Terminal=true
Name=Git Auto Push/Pull
Icon=github-color.svg

but if i add one line, "Exec=xxxxx/git.pl", nautilus show it as normal file, not show "github-color.svg" here.

i use 14.04, and i found only "Exec" line within [Desktop Entry] can occour this, quicklist items not effect. Is this a nautilus bug?

put a screen-shot to introduce different between normal file and desktop file

2

As all executables files a .desktop file needs executable permissions too to be recocgized as a "trusted" starter. Only then Nautilus will also display it's icon.

chmod +x gitauto.desktop

Note that you need an Exec=/path/to/binary_or_script line for a valid .desktop file. Also note that once made executable you will no longer have a right-click context entry to edit a .desktop file.

  • executable permissions/path is not the point. perhaps my declaration is not so clear, so i had added a screenshot here. – eexpress Sep 15 '14 at 12:33
  • @eexpress: Did you try to give your .desktop file executable permission? If yes, then check whether the path to your executable and also to your icon is correct (we need a full path here). In the example you posted above, both the Exec= line is missing, and the Icon= line does not point to a full path. – Takkat Sep 15 '14 at 12:45
  • of course i use full path, but i do not want set executable permission, all my desktop is same eprmission as -rw-rw-r-- and works fine. for my point is let nautilus show desktop files as it does as before, eg 12.04. – eexpress Sep 15 '14 at 12:54
  • @eexpress I want to stress that Takkat is right. If a .desktop file is not executable => no icon. That's how it is. – Jacob Vlijm Sep 15 '14 at 13:03
  • here is my screenshot imagebin.org/319747 – eexpress Sep 15 '14 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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