[Xfce-bugs] [Bug 15706] Thunar 1.8 fails to show thumbnails for webm, txt, html and mardown files

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Fri Jul 19 13:09:18 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=15706

ToZ <tony.paulic at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tony.paulic at gmail.com

--- Comment #3 from ToZ <tony.paulic at gmail.com> ---
You can use the desktop thumbnailer and create a custom thumbnailer to
accomplish this.

First, create the file /usr/share/thumbnailers/text.thumbnailer with the
following content:

[Thumbnailer Entry]
Version=1.0
Encoding=UTF-8
Type=X-Thumbnailer
Name=Text Thumbnailer
MimeType=text/plain;text/html;text/css;
Exec=/usr/local/bin/textthumb %s %i %o

*add any other MimeTypes that you would like covered to the MimeType line

Second, create the file /usr/local/bin/textthumb with the following content:

#!/bin/bash
iFile=$(<"$2")
iChopped="${iFile:0:1600}"
unset iFile
echo "${iChopped}" > tmp.txt
unset iChopped
convert -size 210x290 -background white -pointsize 5 -border 10x10 -bordercolor
"#CCC" caption:@"tmp.txt" "$3"
rm tmp.txt

*make this file executable.

Restart tumbler and you should get text thumbnails. (Note: depends on tumbler
0.2 or greater).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list