gsettings-desktop-schemas 3.0.0-0ubuntu1 fails to create thumbnailers schema directory /usr/share/thumbnailers and necessary files within

Bug #769594 reported by walkerstreet
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gsettings-desktop-schemas (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gsettings-desktop-schemas

I am running 3 machines (with diverse hardware) with amd64 Natty and the Gnome3 ppa (Gnome Shell) installed. In order to get Nautilus thumbnails working (especially pdf thumbnails), I had to do the following steps:

1) Create the gsettings thumbnailer directory as root:

sudo -s
mkdir /usr/share/thumbnailers

2) Create the “evince-thumbnailer.thumbnailer” configuration file in /usr/share/thumbnailers AND make it readable by users (in particular nautilus running as user)

sudo gedit /usr/share/thumbnailers/evince-thumbnailer.thumbnailer
chmod 644 /usr/share/thumbnailers/evince-thumbnailer.thumbnailer

With the following contents:

[Thumbnailer Entry]
TryExec=/usr/bin/evince-thumbnailer
Exec=/usr/bin/evince-thumbnailer -s %s %u %o
MimeType=application/pdf;application/x-pdf;image/pdf;

This immediately fixes the lack of pdf thumbnails in Nautilus 3.0.0-0ubuntu1~build3 (provided by Evince 3.0.0-0ubuntu1~build1 evince-thumbnailer).

It also automatically populates the /usr/share/thumbnailers directory with the following files related to thumbnails for other mime types:

$ ls -al /usr/share/thumbnailers
-rw-r--r-- 1 root root 196 2010-12-15 07:57 agr-thumbnailer.desktop
-rw-r--r-- 1 root root 211 2010-12-15 07:57 dvi-thumbnailer.desktop
-rw-r--r-- 1 root root 204 2010-12-15 07:57 eps-thumbnailer.desktop
-rw-r--r-- 1 root root 155 2011-04-23 22:41 evince-thumbnailer.thumbnailer
-rw-r--r-- 1 root root 372 2010-12-15 07:57 ffmpeg-thumbnailer.desktop
-rw-r--r-- 1 root root 204 2010-12-15 07:57 fig-thumbnailer.desktop
-rw-r--r-- 1 root root 522 2010-12-15 07:57 odf-thumbnailer.desktop
-rw-r--r-- 1 root root 209 2010-12-15 07:57 ogg-thumbnailer.desktop
-rw-r--r-- 1 root root 209 2010-12-15 07:57 pdf-thumbnailer.desktop
-rw-r--r-- 1 root root 231 2010-12-15 07:57 psd-thumbnailer.desktop
-rw-r--r-- 1 root root 213 2010-12-15 07:57 ps-thumbnailer.desktop
-rw-r--r-- 1 root root 429 2010-12-15 07:57 raw-thumbnailer.desktop
-rw-r--r-- 1 root root 220 2010-12-15 07:57 svgz-thumbnailer.desktop
-rw-r--r-- 1 root root 194 2010-12-15 07:57 tex-thumbnailer.desktop
-rw-r--r-- 1 root root 192 2010-12-15 07:57 xcf-thumbnailer.desktop

I have attached a tar.gzipped copy of my /usr/share/thumbnailers folder (i.e. with the same files as above).

Revision history for this message
walkerstreet (dbonner) wrote :
Revision history for this message
walkerstreet (dbonner) wrote :
Revision history for this message
walkerstreet (dbonner) wrote :

I have just tested a brand new installation of stock Natty (using Unity and without the Gnome3 ppa).
Thumbnails work properly in the stock Natty version of Nautilus (2.32.2.1-0ubuntu13) and Evince (2.32.2.0-0ubuntu12).
So, this 'bug' probably doesn't impact on the Natty release.
However, it may cause problems in Nautilus and Evince get upgraded to 'version 3' in the future and it will almost certainly cause problems when the Gnome3 ppa is integrated in to the Ubuntu repos (which is my hope). I'm a big fan of choice when it comes to the desktop environment on Ubuntu (although I respect that this might be a contentious issue).
:)
All the best,
Daniel (Walker Street)

tags: added: patch
Revision history for this message
D-dref (d-dref) wrote :

The .desktop extension dont work.

For resolve the problem use .thumbnailer extension with the different mime/type content.

For example, for ogg perview :

1 - Create the file :

     /usr/share/thumbnailers/ogg-thumbnailer.thumbnailer

2 - Put the content :

      [Thumbnailer Entry]
      Exec=/usr/bin/totem-video-thumbnailer -s %s %u %o
      MimeType=application/ogg;application/x-ogg;video/ogg;

      Or if you have ffmpegthumbnailer installed put the content :

      [Thumbnailer Entry]
      Exec=/usr/bin/ffmpegthumbnailer -f -s %s -i %i -o %o
      MimeType=application/ogg;application/x-ogg;video/ogg;

Create other files for all mime/type perview you want.

Revision history for this message
D-dref (d-dref) wrote :

Oops was not %u but %i in line : Exec=/usr/bin/totem-video-thumbnailer -s %s %u %o

So the correct line is : Exec=/usr/bin/totem-video-thumbnailer -s %s %i %o

Revision history for this message
walkerstreet (dbonner) wrote :

Thanks D-dref,
I think our solutions tie in well together.

Revision history for this message
D-dref (d-dref) wrote :

Not really in fact...

Your solution generate only PDF by the evince-thumbnailer.thumbnailer file. Other files do nothing (in my computeur and other anyway)

If you have thunar-thumbnailer & ffmpegthumailer all is generate (all i need anaway).

Files to create are :

File :
     /usr/share/thumbnailers/evince-thumbnailer.thumbnailer
Content :
    [Thumbnailer Entry]
   TryExec=/usr/bin/evince-thumbnailer
   Exec=/usr/bin/evince-thumbnailer -s %s %u %o
   MimeType=application/pdf;application/x-pdf;image/pdf;

File :
     /usr/share/thumbnailers/psd-thumbnailer.thumbnailer
Content :
     [Thumbnailer Entry]
     Exec=/usr/lib/thunar-thumbnailers/psd-thumbnailer %i %o %s
     MimeType=image/x-psd;image/vnd.adobe.photoshop;

File :
     /usr/share/thumbnailers/xcf-thumbnailer.thumbnailer
Content :
     [Thumbnailer Entry]
     Exec=/usr/lib/thunar-thumbnailers/xcf-thumbnailer %i %o %s
     MimeType=image/x-xcf;

File :
     /usr/share/thumbnailers/videos-thumbnailer.thumbnailer
Content :
     [Thumbnailer Entry]
     Exec=/usr/bin/ffmpegthumbnailer -f -s %s -i %i -o %o
     MimeType=application/ogg;application/x-ogg;video/ogg;video/x-ogg;application/mp4;application/x-mp4;video/mp4;video/xmp4;application/flv;application/x-flv;video/flv;video/x-flv;application/webm;application/x-webm;video/webm;video/x-webm;application/msvideo;application/x-msvideo;video/msvideo;video/x-msvideo;application/3gpp;application/x-3gpp;video/3gpp;application/avi;application/x-avi;video/avi;video/x-avi;video/x-3gpp;video/vnd.divx

Revision history for this message
walkerstreet (dbonner) wrote :

I see. You can get all the thumbnails you need with these 2 thumbnailers. I'd like to get the standard gnome thumbnailers (e.g. from Fedora) working.

Revision history for this message
walkerstreet (dbonner) wrote :

Fedora 15 has a thumbnailer setup that is more true to Gnome. There are 3 thumbnailer files in /usr/share/thumbnailers in Fedora:
1. evince.thumbnailer (which is bigger than my files as it includes image viewing not just pdf)
2. gnome-font-viewer.thumbnailer (gnome-font-viewer is not available for Ubuntu though)
3. totem.thumbnailer (for media files)
I've attached file 1 and 3.

Revision history for this message
walkerstreet (dbonner) wrote :

I can confirm that copying the Fedora thumbnailers (evince.thumbnailer and totem.thumbnailer) fixes thumbnails for pdf, avi and jpg files:
i.e. Download and extract the archive posted in the previous comment
sudo cp /home/username/thumbnailers/evince.thumbnailer /usr/share/thumbnailers/
sudo cp /home/username/thumbnailers/totem.thumbnailer /usr/share/thumbnailers/
sudo chmod -R 644 /usr/share/thumbnailers/*

Revision history for this message
Fr_neo (christophe-ivance) wrote :

Hello all, I have problem with the video thumbnail.

I create "videos-thumbnailer.thumbnailer" file in /usr/share/thumbnailers/, and add contents code, but the thumbnail only works localy.

Is it possible to create thumbnail in shared drive (samba) ?

Cordially.

Revision history for this message
walkerstreet (dbonner) wrote :

Sorry I don't know if that's possible. I haven't got any samba shares.

Revision history for this message
Chris Lasher (chris.lasher) wrote :

As Fr_neo points out, the workaround thumbnailers do not work on NFS (Samba) drives. I can't tell if the thumbnailer is timing out or what, but it consumes the desktop for maybe fifteen to thirty seconds trying to make a thumbnail of each PDF file. If a directory is full of PDFs, the system slows to a crawl. Why does this not work for NFS-mounted directories?

Revision history for this message
Chris Lasher (chris.lasher) wrote :

Nevermind, the hanging of the system and failure to produce PDFs on NFS drives is due to bug #778638.

Revision history for this message
Braiam Peguero (braiampe) wrote :

The directory already exist.

Changed in gsettings-desktop-schemas (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.