4

I deleted my ~/.cache/thumbnail folder but some of the PDFs' icons are still not properly displayed. They are still displayed using the default PDF icon. I am attaching a screenshot of the icons. I don't understand why some (the first one) are being displayed correctly (ie, customised icon based on the content) while others have default icon.

The other PDFs are NOT of bad quality print where it looks like it is a scanned copy of a document. Not quite sure what's up with nautilus here.

enter image description here

2
  • Did you delete the thumbnail folder ~/.cache/thumbnails (spelled differently) recursively ? Have the 3 sample thumbnails all been shown before?
    – hc_dev
    Sep 5, 2020 at 11:34
  • @hc_dev Yea, I used rm -rf ~/.cache/thumbnails/. Every time I get the same thumbnails - somehow the first pdf always gets the 'custom icon' whereas the other 2 get the default pdf icon. Sep 5, 2020 at 12:45

3 Answers 3

2

It seems like nautilus cannot generate thumbnails for pdf if evince is not installed or is installed as a flatpak. https://gitlab.gnome.org/GNOME/nautilus/-/issues/13

1
  • This is good info to have, but one of the files is getting the thumbnail generated, so if Evince is required for thumbnail generation, it's probably already installed.
    – ArrayBolt3
    Jul 28, 2022 at 4:32
1

Had the same problem. Reinstalled evince and all is good.

sudo apt-get install evince

0
0

It's important to quit or kill nautilus after the deleting the thumbnails:

nautilus -q
killall nautilus

Check failed thumbnail creation

The path for failed thumbnails (ubuntu 14.04 LTS or later) is ~/.cache/thumbnails/fail. So just check the folder and delete them:

rm -r ~/.cache/thumbnails/fail

Force thumbnail recreation

Try changing its modification timestamp, e.g. via:

touch -m YourFile.pdf

See How to regenerate a specific thumbnail in Nautilus?

Thumbnail recreation mechanism

According to the freedesktop documentation Thumbnail Managing Standard . You can force nautilus to recreate the thumbnail if the mtime (modification time) in the thumbnail is lower than the mtime in the original file.

Thumbnail size restriction

If an thumbnail image is larger than 10 MB, no preview will be displayed, but only the default file icon. To fix this behaviour you can increase this limit (doubling for example):

dconf write /org/gnome/nautilus/preferences/thumbnail-limit

Thumbnailer

You can try to create a thumbnail manually to see if a PDF can be properly converted to a thumbnail (first page [0] only):

convert  -thumbnail x300 YourFile.pdf[0] thumbnail.png
2
  • 1
    Point here is that the thumbnails have been deleted, so one would expect they are all being regenerated.
    – vanadium
    Sep 5, 2020 at 10:22
  • 1
    Yea this doesn't work, it recreates the default PDF icon and not the custom icon I desire. Sep 5, 2020 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .