Thumbnails: Difference between revisions

Crazivik (talk | contribs)
No edit summary
Crazivik (talk | contribs)
consolidated repeated code from various code blocks into a single block in new 'troubleshooting sub-sesction'
 
Line 6: Line 6:
* GNOME environments with the option <code>services.gnome.core-utilities.enable = false;</code>
* GNOME environments with the option <code>services.gnome.core-utilities.enable = false;</code>
* Custom environments built from ground-up using window managers like sway or hyperland
* Custom environments built from ground-up using window managers like sway or hyperland
=== Save yourself hours of troubleshooting!! ===
Thumbnailers may already be installed in your system as dependencies of image/video applications but are not activated.
Run <code>cd /run/current-system/sw/share/thumbnailers && ls</code> to list installed thumbnailers. If relevant .thumbnailer files are present and we still don't have thumbnails in our file explorer then we may need to activate them by updating symlinks to <code>share/thumbnailers</code>
<syntaxhighlight lang="nix">
# configuration.nix
{
  environment.pathsToLink = [
    "share/thumbnailers"
  ];
}
</syntaxhighlight>


=== Enable Video Thumbnails ===
=== Enable Video Thumbnails ===
Line 12: Line 28:
Thumbnails for the following MimeTypes are enabled: ''video/jpeg; video/mp4; video/mpeg; video/quicktime; video/x-ms-asf; video/x-ms-wm; video/x-ms-wmv; video/x-ms-asx; video/x-ms-wmx; video/x-ms-wvx; video/x-msvideo; video/x-flv; video/x-matroska; application/x-matroska; application/mxf; video/3gp; video/3gpp; video/dv; video/divx; video/fli; video/flv; video/mp2t; video/mp4v-es; video/msvideo; video/ogg; video/vivo; video/vnd.avi; video/vnd.divx; video/vnd.mpegurl; video/vnd.rn-realvideo; application/vnd.rn-realmedia; video/vnd.vivo; video/webm; video/x-anim; video/x-avi; video/x-flc; video/x-fli; video/x-flic; video/x-m4v; video/x-mpeg; video/x-mpeg2; video/x-nsv; video/x-ogm+ogg; video/x-theora+ogg.''
Thumbnails for the following MimeTypes are enabled: ''video/jpeg; video/mp4; video/mpeg; video/quicktime; video/x-ms-asf; video/x-ms-wm; video/x-ms-wmv; video/x-ms-asx; video/x-ms-wmx; video/x-ms-wvx; video/x-msvideo; video/x-flv; video/x-matroska; application/x-matroska; application/mxf; video/3gp; video/3gpp; video/dv; video/divx; video/fli; video/flv; video/mp2t; video/mp4v-es; video/msvideo; video/ogg; video/vivo; video/vnd.avi; video/vnd.divx; video/vnd.mpegurl; video/vnd.rn-realvideo; application/vnd.rn-realmedia; video/vnd.vivo; video/webm; video/x-anim; video/x-avi; video/x-flc; video/x-fli; video/x-flic; video/x-m4v; video/x-mpeg; video/x-mpeg2; video/x-nsv; video/x-ogm+ogg; video/x-theora+ogg.''


<syntaxhighlight lang="nix"># configuration.nix
<syntaxhighlight lang="nix">
# configuration.nix
{ pkgs, ... }:  
{ pkgs, ... }:  
{
{
Line 21: Line 38:
   ];
   ];


   # 'ffmpegthumbnailer.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'  
   # 'ffmpegthumbnailer.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'
    # but thumbnails are not displayed unless symlinks to 'share/thumbnailers' are also defined
 
  # uncomment if this has already been defined in your configuration.nix
  environment.pathsToLink = [
    "share/thumbnailers"
  ];


}
}
Line 37: Line 48:
Thumbnails for the following MimeTypes are enabled: ''image/png; image/jpeg; image/bmp; image/x-bmp; image/x-MS-bmp; image/gif; image/x-icon; image/x-ico; image/x-win-bitmap; image/vnd.microsoft.icon; application/ico; image/ico; image/icon; text/ico; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; image/tiff; image/x-xpixmap; image/x-xbitmap; image/x-tga; image/x-icns; image/x-quicktime; image/qtif.''
Thumbnails for the following MimeTypes are enabled: ''image/png; image/jpeg; image/bmp; image/x-bmp; image/x-MS-bmp; image/gif; image/x-icon; image/x-ico; image/x-win-bitmap; image/vnd.microsoft.icon; application/ico; image/ico; image/icon; text/ico; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; image/tiff; image/x-xpixmap; image/x-xbitmap; image/x-tga; image/x-icns; image/x-quicktime; image/qtif.''


<syntaxhighlight lang="nix"># configuration.nix
<syntaxhighlight lang="nix">
# configuration.nix
{ pkgs, ... }:  
{ pkgs, ... }:  
{
{
Line 45: Line 57:
   ];
   ];


   # 'gdk-pixbuf-thumbnailer.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'  
   # 'gdk-pixbuf-thumbnailer.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'
    # but thumbnails are not displayed unless symlinks to 'share/thumbnailers' are also defined
 
  # uncomment if this has already been defined in your configuration.nix
  environment.pathsToLink = [
  "share/thumbnailers"
  ];


}</syntaxhighlight>
}</syntaxhighlight>
Line 70: Line 76:
   ];
   ];


   # 'heif.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'  
   # 'heif.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'
    # but thumbnails are not displayed unless symlinks to 'share/thumbnailers' are also defined
 
  # uncomment if this has already been defined in your configuration.nix
  environment.pathsToLink = [
  "share/thumbnailers"
  ];


}
}
Line 98: Line 98:


   # 'nufraw.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'  
   # 'nufraw.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'  
    # but thumbnails are not displayed unless symlinks to 'share/thumbnailers' are also defined
  # uncomment if this has already been defined in your configuration.nix
  environment.pathsToLink = [
  "share/thumbnailers"
  ];


}</syntaxhighlight>
}</syntaxhighlight>


By default nufraw-thumbnailer   
nufraw-thumbnailer   


* creates thumbnails using the embedded 'jpeg' in the camera raw files. ( <code>--noexif</code> )
* creates thumbnails using the embedded 'jpeg' in the camera raw files. ( <code>--noexif</code> )
Line 113: Line 107:


Output of <code>cat /run/current-system/sw/share/thumbnailers/nufraw.thumbnailer</code>:
Output of <code>cat /run/current-system/sw/share/thumbnailers/nufraw.thumbnailer</code>:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
[Thumbnailer Entry]
[Thumbnailer Entry]
Line 142: Line 137:
     # MimeTypes not listed here but listed in the default nufraw.thumbnailer will continue displaying
     # MimeTypes not listed here but listed in the default nufraw.thumbnailer will continue displaying
       # thumbnails generated form the 'embedded jpeg' without the EXIF metadata
       # thumbnails generated form the 'embedded jpeg' without the EXIF metadata
  ];
  # uncomment if this has already been defined in your configuration.nix
  environment.pathsToLink = [
  "share/thumbnailers"
   ];
   ];


Line 169: Line 159:
       MimeType=image/x-adobe-dng;image/x-dng;image/x-canon-cr2;image/x-canon-crw;image/x-cr2;image/x-crw;
       MimeType=image/x-adobe-dng;image/x-dng;image/x-canon-cr2;image/x-canon-crw;image/x-cr2;image/x-crw;
     '';)
     '';)
  ];
  # uncomment if this has already been defined in your configuration.nix
  environment.pathsToLink = [
  "share/thumbnailers"
   ];
   ];