[Thunar-dev] PDF Thumbnailer

Erlend Davidson E.R.M.Davidson at sms.ed.ac.uk
Sun Aug 5 12:12:26 CEST 2007



Erik Harrison wrote:
> On 8/4/07, Erlend Davidson <E.R.M.Davidson at sms.ed.ac.uk> wrote:
>   
>> I want to include a simple PDF thumbnailer for thunar, which uses
>> ImageMagick.  I know there is already one, but it depends on evince
>> being installed which would require a number of gnome libraries - not
>> everyone wants to do this, especially not for a simple thumbnail.
>>
>> The trouble is if I include a thumbnailer which supports a format
>> already supported by an existing thumbnailer - what happens?  I presume
>> mine (being added to the system later) would override thunar's default,
>> which probably isn't the intended option.  If you have evince installed
>> then I would say it is the best (fastest) means of thumbnailing a PDF.
>>
>> This this in mind I want to propose to Benedict that the .desktop files
>> for each thumbnailer have another field:
>> X-Thumbnailer-Priority
>> which is a number: 1 being a low priority and anything above that
>> increasingly higher priority.  The default priority for any thumbnailer
>> in thunar should be 10, that way when I want to include (for example)
>> the PDF thumbnailer I can set the priority to be 5... when
>> /usr/libexec/thunar-vfs-update-thumbnailers-cache-1 is run by the user
>> the highest priority thumbnailers which have their TryExec found will be
>> added to the thumbnailer cache.
>>     
>
> This seems like It's fairly useless. How do you coordinate priorities
> between thumbnailers? And if you don't, then every thumbnailer just
> uses Priority 10, and you still have the conflict, so it comes down to
> looking for TryExec.
Well so far there are only two ways to get a thumbnailer in thunar...
1. use the built-in ones
2. use thunar-thumbnailers
(actually there is a third: write your own, but that becomes your 
responsibility to look after).
>  Considering that the proposed usecase is that you
> don't have evince installed, merely looking up the TryExec program
> oughtta be sufficient, although I'm not sure it's possible.
>   
What if you have both evince and pdf-thumbnailer installed.  I'd rather 
the user used evince (for two reasons, it's 50% faster and the 
thumbnails it generates are slightly different style from 
pdf-thumbnailer) but there is no way of controlling which is used.  Both 
will satisfy their TryExecs.  Actually my use-case was a bit confusing: 
I just trying to show how it would fall back to a lower-priority 
thumbnailer if a TryExec wasn't met.
> It still leaves the possibility of conflicts which the user has no
> method for easily resolving.
>
> A more crafty solution might be to use whatever thumbnailer depends on
> the preferred app for the mimetype, but that might be next to
> impossible to implement.
>   
All images on my machine open with gliv, which can't do thumbnailing.  
Also it would be fiddly for the user, much more difficult to implement 
and potentially slower (since checking to see which thumbnailer to be 
used would be done on every individual thumbnail).

Thanks,

Erlend



More information about the Thunar-dev mailing list