I have Ubuntu 14.04 Gnome edition on both my laptop and the desktop; both are up-to-date but they have a different past-history of installations and upgrades.
Now, text-type thumbnails are different in the two machines, and I am unable to find where the difference is. This post: What rendering engine does Nautilus use to show HTML previews/thumbnails? seems obsolete (no entries in dconf
for them), and Generate thumbnails for text? would help (but it's unanswered).
Look at this composed shot:
In the laptop the thumbnails have a small excerpt of the content of the file (the real content) while in my desktop they are simply blank.
I dug a bit around but I can't find which option/package is responsible of the laptop behavior (which I do prefer, by the way).
How can I enable the "text snapshot" in thumbnails? (And if they had syntax highlighting, like in the linked question, it would be great).
Best Answer
It seems for an icon theme to let Nautilus display the contents of plain text files as thumbnails, its sub-directory for mime types, which might be named, for example, mimes or mimetypes should have a file named text-x-preview.icon (along with an icon file named text-x-preview.png or text-x-preview.svg, etc. serving as a backdrop for the file contents thumbnail), which is actually a plain text file including settings for the thumbnail, in each sub-directory for different icon sizes (for example, 22, 24, 48).
For example, I have added
~/.local/share/icons/Nitrux/mimetypes/48/text-x-preview.icon
(imported from the default Humanity icon theme) to my current icon theme, and only then it has begun displaying thumbnails for plain text files, which has the following content:I'll hopefully try and add more information about the settings above in due course.
These two files in the Humanity icon theme have exactly the same content:
NOTE: Unfortunately this whole thing no longer works under Ubuntu 15.04