How to place custom icons (not emblems) on folders in Thunar

This feature request has come up on the mailing-lists several times, and was quite recently proposed in this discussion. However, the answer from Simon Steinbeiß, an active xfce and xubuntu developer, was that:

You can use either emblems (right-click > properties > emblems) or the user-dirs (the fixed list of user directories can be found and modified in ~/.config/user-dirs.dirs). No support for custom folder-icons at the moment.

There is a discussion at the xfce forum on how thunar custom icons could be accomplished, and a patch has even been submitted for thunar. It is explained that the patch

scans the thumbnaill dir and loads a custom icon if there's a file that matches the file name on the desktop. So a file on the desktop named foo will have a custom icon loaded if the image in the .thumbnails dir is foo.gif

However, one of the leading xfce developers, Nick Schermer, has commented that

Non md5hash files in the .thumbnails directory is a bad idea.
The prefix-only check if a bit flawed as well, it can be improved with a dot-check (so foo2.png is not matched).

So the method as described in the patch has not really been validated by the developers, and because it would involve a lot of time compiling thunar and its dependencies (as noted here), and then a lot of risk in installing them to your system, I would advise against trying it. You could experiment of course in a virtualised environment (virtualbox) or on a computer set aside for development, but not on a stable system.

It is usually fine to compile programs and apply patches, as I have discussed in many examples on this site, but on this occasion it is better to wait until a solution is available that has been validated by the developers.

For now the question is 'solved', but I will continue to update it and indeed research the issue to see how it could be accomplished in the manner that it is done in Nautilus.


The best workaround is to create the desired "launcher" on the desktop in application launcher you can set a custom icon, even pick a file from your own collection.

The command of the launcher should be set to thunar <desired directory>

Then cut + paste the launcher to the desired location.