RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
c64club

RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by c64club »

Hi,
I write this as it's my first "serious" problem with Mint since Mint 13 or 14, and this time I can't resolve it. Really, all these years just Install&work, very sometimes a little tweak. So I never took your precious time for smaller problems that I could live with.

To the point. The same problem touches 19.3 Xfce and newest 20 Xfce, both with Thunar and Nemo file managers. I switched from taking photos in JPG format to RAW, particularly Panasonic RW2 files. I just need one simple feature in file manager - RAW thumbnails.
As it's said in many places "in the Net", I created /usr/share/thumbnailers/ufraw.thumbnailer/i] file containing

Code: Select all

[Thumbnailer Entry]
Exec=/usr/bin/ufraw-batch --embedded-image --out-type=png --size=%s %u --overwrite --silent --output=%o
MimeType=image/x-3fr;image/x-adobe-dng;image/x-arw;image/x-bay;image/x-canon-cr2;image/x-canon-crw;image/x-cap;image/x-cr2;image/x-crw;image/x-dcr;image/x-dcraw;image/x-dcs;image/x-dng;image/x-drf;image/x-eip;image/x-erf;image/x-fff;image/x-fuji-raf;image/x-iiq;image/x-k25;image/x-kdc;image/x-mef;image/x-minolta-mrw;image/x-mos;image/x-mrw;image/x-nef;image/x-nikon-nef;image/x-nrw;image/x-olympus-orf;image/x-orf;image/x-panasonic-raw;image/x-pef;image/x-pentax-pef;image/x-ptx;image/x-pxn;image/x-r3d;image/x-raf;image/x-raw;image/x-rw2;image/x-rwl;image/x-rwz;image/x-sigma-x3f;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-sr2;image/x-srf;image/x-x3f;image/x-panasonic-raw2;
Works for all RAW files (Canon, Nikon, Sony). All but Panasonic RW2... I checked mime type by "right click > Properties". Nemo says "image/x-panasonic-rw2" (not image/x-panasonic-raw2) so I added image/x-panasonic-rw2; at the end of mime types list in thumbnailer file. Did nemo -q, deleted all thumbnail caches. Still works for all files, excluding RW2.
To be precise - it worked in 19.3 but only 2, maybe 3 days. Then stopped showing RW2 thumbnails, still showing CR2 and others. In 20 Xfce didn't even show one thumbnail for RW2. Althrough ufraw is no more available in apt-get in Mint 20, ufraw-thumbnailer works :shock:

I tried second method - DCRAW
manually in terminal, dcraw -e -c myphoto.RW2 > myphoto.jpg gives a JPG file containig 1920x1440 image. For CR2 it gives full sensor resolution JPG. So it works - extracts internal JPG file from RAW. Ok, let's make thumbnailer.
I deleted [/usr/share/thumbnailers/ufraw.thumbnailer] and made /usr/share/thumbnailers/dcraw.thumbnailer containing:

Code: Select all

[Thumbnailer Entry]
Exec=/usr/bin/dcraw -e -c
MimeType=image/x-3fr;<all-previous-list>;image/x-panasonic-raw2;image/x-panasonic-rw2;
Still doesn't work for RW2 files, works for others.

So I tried to search what is wrong in system. What I know is:
1. file manager (both Nemo and Thunar) recognizes RAW files from other cameras and choses right thumbnailer script to process them
2. file manager (both Nemo and Thunar) recognizes MIME type of my RW2 (reports image/x-panasonic-rw2 type)
3. both programs used as thumbnailers (ufraw, dcraw) can process all RAW types including my RW2 manually from terminal, but excluding RW2 when invoked by file manager
4. mime type for files are recognized by some else method than /etc/mime.types - this file doesn't contain image/x-panasonic-rw2 or image/x-panasonic-raw2 (and most others, still recognized and reported by FM)
5. adding ~/mime.types file containing new definitions doesn't change anything
6. there exist many xyz.xml files under /usr/share/mime/image/ directory, all of them containing line <!--Created automatically by update-mime-database. DO NOT EDIT!--> plus sophisticated info about every filetype (name in 50 languages, sort of content info)

So - where does update-mime-database look when it (re)creates /usr/share/mime directory structure?
Maybe this will help to recognize and direct my RW2 files to thumbnailer "processor".

What I intend to do (after backing home) is:
0. put SD card in reader
1. initially sort my today's series of photos using file manager - copy particular images to let's say ~/photos/2020/animals/birds/skuas, ~/photos/2020/animals/birds/sheathbills and ~/photos/2020/landscapes/glaciers - the fastest way.
2. then Run RawTherapee and process chosen images, already sorted under directories

Of course I could use Digikam or Darktable but they:
a) need "importing a film role" or other stupid operations, when I prefer to manage just a files (I know that my camera produces bunch files containing image data, not "filmstrip" or "album")
b) slow down my workflow much - their file managers "image managers" are dumb and impaired, also not seeing freshly added files sorting files under file manager is most "natural" and fastest for me
c)don't see all images in directories - I can have 100 images in directory but DT sees only five because it has only five in database, because I haven't "imported" 95 files into directory that contains these 95 files (facepalm)
d) as an effect - such software slow down my workflow painfully, comparing to file manager with thumbnail option
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by MrEen »

Hi c64club, and welcome to the forum.

Do you have Tumbler installed and is the Raw-thumbnailer Plugin loaded in that?

From here:
Raw-thumbnailer
RAW image files using libopenraw (Adobe DNG, Canon CRW CR2, Epson ERF, Fuji RAF, Minolta MRW, Nikon NEF and NRW, Olympus ORF, Panasonic RAW and RW2, Pentax PEF, Sony ARW)
c64club

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by c64club »

Thanks,
Had tumbler installed already. Just installed tumbler-plugins-extra, deleted both my ufraw.thumbnailer and dcraw.thumbnailer files from /usr/share/thumbnailers. Tumbler doesn't work (probably also needs some .thumbnailer script but installer didn't create it.

Edit: rebooted. No effect.

I suppose that problem is in mime recognition, not in thumbnailing program. That's why I think this way:
1. dcraw -e -c can extract JPG from all RAW formats including RW2 if invoked from terminal. Does also extract all but RW2 for file manager. Probably FM (Nemo and Thunar) doesn't invoke dcraw for RW2 files, but invokes for all other RAW types.
2. ufraw.thumbnailer file containing ufraw-batch (plus parameters) command also works for all RAW (CR2, ARW, NEF, only not for RW2) when invoked by FM.

What is X-files case for me in Mint 20
  1. apt says "Package 'ufraw' has no installation candidate"
  2. I cannot invoke ufraw-batch command from terminal
  3. BUT! /usr/share/thumbnailers/ufraw.thumbnailer file containing Exec=/usr/bin/ufraw-batch --parameters works in FM :shock: (for all RAWs excluding RW2)
Mint 20 has ufraw-batch hardcoded somewhere else, or what?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by MrEen »

All of that is over my head I'm afraid.

The one thing I would try, and you might be smart enough to know it won't work, is at the end of this line:

Code: Select all

MimeType=image/x-3fr;image/x-adobe-dng;image/x-arw;image/x-bay;image/x-canon-cr2;image/x-canon-crw;image/x-cap;image/x-cr2;image/x-crw;image/x-dcr;image/x-dcraw;image/x-dcs;image/x-dng;image/x-drf;image/x-eip;image/x-erf;image/x-fff;image/x-fuji-raf;image/x-iiq;image/x-k25;image/x-kdc;image/x-mef;image/x-minolta-mrw;image/x-mos;image/x-mrw;image/x-nef;image/x-nikon-nef;image/x-nrw;image/x-olympus-orf;image/x-orf;image/x-panasonic-raw;image/x-pef;image/x-pentax-pef;image/x-ptx;image/x-pxn;image/x-r3d;image/x-raf;image/x-raw;image/x-rw2;image/x-rwl;image/x-rwz;image/x-sigma-x3f;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-sr2;image/x-srf;image/x-x3f;image/x-panasonic-raw2;
Might it work if you change the end of that to image/x-panasonic-rw2;
c64club

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by c64club »

Thanks. It doesn't work either the end of file is image/x-panasonic-rw2; or image/x-panasonic-raw2; or image/x-panasonic-raw2;image/x-panasonic-rw2;, I checked it before posting a problem. As I stated, on my 19.3 machine it worked, for about 2 or 3 days (with double mime type at the end of file).


So I would like to check what's wrong with MIME types recognition.
c64club wrote:
. file manager (both Nemo and Thunar) recognizes RAW files from other cameras and choses right thumbnailer script to process them
2. file manager (both Nemo and Thunar) recognizes MIME type of my RW2 (reports image/x-panasonic-rw2 type)
3. both programs used as thumbnailers (ufraw, dcraw) can process all RAW types including my RW2 manually from terminal, but excluding RW2 when invoked by file manager
4. mime type for files are recognized by some else method than /etc/mime.types - this file doesn't contain image/x-panasonic-rw2 or image/x-panasonic-raw2 (and most others, still recognized and reported by FM)
5. adding ~/mime.types file containing new definitions doesn't change anything
6. there exist many xyz.xml files under /usr/share/mime/image/ directory, all of them containing line <!--Created automatically by update-mime-database. DO NOT EDIT!--> plus sophisticated info about every filetype (name in 50 languages, sort of content info)

So - where does update-mime-database look when it (re)creates /usr/share/mime directory structure?
but I don't know where to start.
c64club

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by c64club »

Removed both RAW .thumbnailer files from /usr/share/thumbnailers.

Tumbler + plugins are installed. Not working for any RAW. Maybe it's just nor started by system, i'm not sure, but don't have even basic idea where to search.
c64club

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by c64club »

I restarted machine once more (power generator has been switched) and CR2 thumbnails are generated again, using "stock" config files without my own under /usr/share/thumbnailers. But RW2 - still no support.

Thanks, I haven't searched for CR2. Extremely similar problem. And extremely similar "no solution". Tried all mentioned in your last link, with the same effect. My FM still doesn't generate thumbnails for my particular raws (panasonic) - exactly as guy's XFCE doesn't generate thumbnail for his particular raw format (Canon), which mine does :)
Trying links and pages referred by ther users there.

In meantime, I also tried to turn off tumbler's file size limit as stated in your link. Also no effect.

The most extreme (and simplest) solution described there is to switch to KDE. But this will be the last of lasts, just before switching back to Windows after 13 years :cry:

EDIT.
Dcided to start over:
  • Changed /etc/xdg/tumbler/tumbler.rc settings. In [RawThumbnailer] section I changed Disabled=false to Disabled=true. .
  • Stopped Thunar and Nemo.
  • Deleted ~/.cache/thumbnails , ~/thumbnails /usr/share/thumbnailer/ufraw.thumbnailer and dcraw.thumbnailer.
  • Deleted "image/x-panasonic-rw2 and -raw2" from /usr/share/thumbnailers/gdx-pixbuff.thumbnailer
  • restarted machine again.
Opened RAWs folder with Nemo, waited seconds and CR2 files got their thumbnails again :shock: Rest of RAWs don't have thumbnails.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by MrEen »

See the answer by Dan here. I suspect it might at least fix Nemo, but not sure about Thunar. I'm hoping you don't already have all those installed.

Also look at replies below, such as odinho - Velmont's answer.
c64club

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by c64club »

In Mint 19.3 after re-enabling tumbler, I have all RAWs thumbnails both in Nemo and Thunar. So, SOLVED.

Will not try in 20 - it has too much nonworking essentials (samba, very long start). So I reinstalled 19.3 to second machine and go back to image editing. Will play with 20 as I finish few projects.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by MrEen »

I'm glad you have an acceptable (for now) solution.
c64club

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by c64club »

Thanks a lot, especially for patience and searching. I do the same in motorcycle forums I administrate :)

Yes, another time I get full solution from Mint, with minimal tinkering. Years ago I started from Slackware, but now I prefer using over configuring. Thanks Mint crew!
daleneroot
Level 1
Level 1
Posts: 3
Joined: Tue Dec 29, 2020 2:17 pm

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by daleneroot »

Hello
Coming back to Linux after a 7 yr hyatis. Anyway I am trying to figuree out what the actuall solution to the Panasonic RW2 thumbnails. Could someone help me?

Thank you
Dalene Root
RobertGM
Level 2
Level 2
Posts: 75
Joined: Mon Dec 09, 2019 4:58 pm

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by RobertGM »

This is a little after the fact but thank you for the ufraw.thumbnailer content.
I was unable to view CR2 (raw from a Canon camera) thumbnails in Nemo . After creating that file thumbnails now load.
chromated
Level 1
Level 1
Posts: 1
Joined: Sat Nov 20, 2021 11:32 pm

Re: RAW photos thumbnails in Nemo (or Thunar) under Mint Xfce 19.3 and 20

Post by chromated »

Hi all, I just had the same issue with Mint 20.2 and this solution worked like at treat with Nemo for me, so thanks guys!
Locked

Return to “Xfce”