GNOME Bugzilla – Bug 787249
thumbnails fail to generate with gnome-desktop from git master branch.
Last modified: 2017-09-06 11:36:48 UTC
Using gnome-desktop from git master branch and bubblewrap 0.1.8, thumbnails do not get generated or stored. I do see a lot of /tmp/gnome-desktop-thumbna*** folders quickly appearing and disappearing. However no thumbnail shows or gets cached.
Do applications generating thumbnails show errors? If so, what are they? You can also try to use the test-desktop-thumbnail test program in gnome-desktop to catch errors. Are there any specific formats that fail? What distribution do you use? If the error is not conclusive, please try changing the "#if 0" line in gnome_desktop_thumbnail_script_exec() to "#if 1" and gather the output so we can see how bwrap is launched.
/libgnome-desktop/test-desktop-thumbnail ./back.jpg ../back-thumb.jpb (process:10156): GnomeDesktop-WARNING **: gnome_desktop_thumbnail_factory_generate_thumbnail() failed to generate a thumbnail for ./back.jpg The failure is regardless of the format. I use Arch Linux but I compile personal gnome packages because Arch only provides release packages. Now with changing "#if 0" to "#if 1" in gnome_desktop_thumbnail_script_exec(): ./libgnome-desktop/test-desktop-thumbnail ./back.jpg ../back-thumb.jpb About to launch script: bwrap --ro-bind /usr /usr --proc /proc --dev /dev --symlink usr/lib /lib --symlink usr/lib64 /lib64 --symlink usr/bin /bin --symlink usr/sbin /sbin --chdir / --setenv GIO_USE_VFS local --unshare-all --die-with-parent --bind /tmp/gnome-desktop-thumbnailer-4Y605Y /tmp --ro-bind /home/hussam/cache/gnome/gnome-desktop/src/gnome-desktop/back.jpg /tmp/gnome-desktop-file-to-thumbnail.jpg --seccomp 8 /usr/bin/gdk-pixbuf-thumbnailer -s 256 /tmp/gnome-desktop-file-to-thumbnail.jpg /tmp/gnome-desktop-thumbnailer.png (process:14020): GnomeDesktop-WARNING **: gnome_desktop_thumbnail_factory_generate_thumbnail() failed to generate a thumbnail for ./back.jpg
Could you try running: mkdir /tmp/gnome-desktop-thumbnailer-4Y605Y Followed by: bwrap --ro-bind /usr /usr --proc /proc --dev /dev --symlink usr/lib /lib --symlink usr/lib64 /lib64 --symlink usr/bin /bin --symlink usr/sbin /sbin --chdir / --setenv GIO_USE_VFS local --unshare-all --die-with-parent --bind /tmp/gnome-desktop-thumbnailer-4Y605Y /tmp --ro-bind /home/hussam/cache/gnome/gnome-desktop/src/gnome-desktop/back.jpg /tmp/gnome-desktop-file-to-thumbnail.jpg /usr/bin/gdk-pixbuf-thumbnailer -s 256 /tmp/gnome-desktop-file-to-thumbnail.jpg /tmp/gnome-desktop-thumbnailer.png (That's the same command but without seccomp)
Ok, I reinstalled bubblewrap with --with-priv-mode=setuid (seems I wasn't using that option). Now. .jpeg, .pdf, and totem work. I'm checking why the rest won't work.
gsk-office.thumbnailer is failing still. Exec=gsf-office-thumbnailer -i %i -o %o -s %s
With what error?
(In reply to Hussam Al-Tayeb from comment #4) > Ok, I reinstalled bubblewrap with --with-priv-mode=setuid (seems I wasn't > using that option). I've filed this: https://github.com/projectatomic/bubblewrap/issues/213 It's possible to install bwrap in a way that won't run. That's why there's distributions ;)
Created attachment 359257 [details] [review] thumbnail: Add debug when loading an image file fails
Created attachment 359258 [details] [review] thumbnail: Fix gsf-office-thumbnailer not working The gsf-office-thumbnailer expects a local file path to be passed, but instead of treating one of expand_thumbnailing_elem()'s arguments as a local path (which it is), we treated it as a URI and tried to convert it to a URI. That obviously failed, and the thumbnailer wasn't even launched.
Attachment 359257 [details] pushed as d0575a3 - thumbnail: Add debug when loading an image file fails Attachment 359258 [details] pushed as 26b1b55 - thumbnail: Fix gsf-office-thumbnailer not working