Ubuntu – One Thunar folder doesn’t show icons as in the other one

desktopiconsthunar-custom-actionsxubuntu

I've been trying to solve Docky not showing Xfce and Thunar icons, and did with the help of this thread.

However in the process of it I started wondering, why these two folders (/usr/share/applications/ and ~/.local/share/applications/) are showing file icons differently?
screenshot

I've not found any setting in Thunar options regarding this.

Best Answer

The folder /usr/share/applications is handled in a special way and the icons displayed for a .desktop-file are defined in the .desktop-file itself. If you take a deeper look you will see that Thunar also does not display the real file names in /usr/share/applications but an alias which is also defined in the .desktop-file.

For the folder ~/local/share/applications all this is not the case, Thunar displays the real file names and the default icons for the different file types.

The question Can Nautilus display a .desktop file by its real name? is heavily related, at least regarding the displayed file names.

Trick with soft-link:

If you want to display the files in ~/.local/share/applications in the same way as files are displayed in /usr/share/applications, you could do it with a soft-link placed in /usr/share which points to ~/.local/share/applications:

sudo ln -s ~/.local/share/applications /usr/share/applicationsinhome

Now you can browse in Thunar to /usr/share/applicationsinhome. This will display the files located in ~/.local/share/applications in the same way as the files in /usr/share/applications and you would still be able to delete, create or edit files without root-privileges.

Please take a look at my answer in the linked question too, there I explained how to do it the other way around.

Related Question