#3 Add a thumbnailer file

Closed
ebassi wants to merge 2 commits from ebassi/thumbnailer into necklace/master
ebassi commented 3 years ago

The thumbnailer file is used by thumbnail generators, like file managers. By installing this file, users will be able to get thumbnails of JPEG2000 files.

The thumbnailer file is used by thumbnail generators, like file managers. By installing this file, users will be able to get thumbnails of JPEG2000 files.

This is a great addition, thanks! This probably works great on Debian, but unfortunately I can't get it to work on Arch.

First, it seems Archlinux puts thumbnailers in /usr/share/thumbnailers, but the install script seems to be installing in /usr/local/share/thumbnailers/?

Second, I see the file it generates on my system looks like this:

[Thumbnailer Entry]
TryExec=/usr/local/bin/gdk-pixbuf-thumbnailer
Exec=/usr/local/bin/gdk-pixbuf-thumbnailer -s %s %u %o
MimeType=image/jp2;image/jpm;image/jpx;image/jpeg2000;image/x-jp2-codestream;

But, /usr/local/bin/gdk-pixbuf-thumbnailer doesn't exist on arch, it seems it's just at /usr/bin/gdk-pixbuf-thumbnailer

Maybe a meson bug?

I use XFCE, and it also seems Thunar is unable to create thumbnails for some reason. Might be related to this though: https://gitlab.xfce.org/xfce/tumbler/-/issues/27

This is a great addition, thanks! This probably works great on Debian, but unfortunately I can't get it to work on Arch. First, it seems Archlinux puts thumbnailers in /usr/share/thumbnailers, but the install script seems to be installing in /usr/local/share/thumbnailers/? Second, I see the file it generates on my system looks like this: ``` [Thumbnailer Entry] TryExec=/usr/local/bin/gdk-pixbuf-thumbnailer Exec=/usr/local/bin/gdk-pixbuf-thumbnailer -s %s %u %o MimeType=image/jp2;image/jpm;image/jpx;image/jpeg2000;image/x-jp2-codestream; ``` But, /usr/local/bin/gdk-pixbuf-thumbnailer doesn't exist on arch, it seems it's just at /usr/bin/gdk-pixbuf-thumbnailer Maybe a meson bug? I use XFCE, and it also seems Thunar is unable to create thumbnails for some reason. Might be related to this though: https://gitlab.xfce.org/xfce/tumbler/-/issues/27
ebassi commented 3 years ago
Poster

The default prefix for Meson is /usr/local, so it will install things under that. The thumbnailers directory is typically discovered through the $XDG_DATA_DIRS and $XDG_DATA_HOME environment variables from the XDG base directories specification.

But, /usr/local/bin/gdk-pixbuf-thumbnailer doesn't exist on arch, it seems it's just at /usr/bin/gdk-pixbuf-thumbnailer

Ah, yes, that's a good point. I operated under the assumption that a system installation is going to use /usr as a prefix.

Sadly, gdk-pixbuf does not export the location of the thumbnailer program in the pkg-config file. I can fix that upstream, but it'll take a bit to be available in the various Linux distributions.

For the time being, I can fix it manually:

  • search for gdk-pixbuf-thumbnailer in the $PATH and use that as the Exec value
  • add a build option in the meson_options.txt to let packagers override the location and name of the gdk-pixbuf-thumbnailer binary from the default, like the build already does for the gdk-pixbuf-query-loaders tool.
The default prefix for Meson is `/usr/local`, so it will install things under that. The thumbnailers directory is typically discovered through the `$XDG_DATA_DIRS` and `$XDG_DATA_HOME` environment variables from the [XDG base directories specification](https://specifications.freedesktop.org/basedir-spec/latest/). > But, /usr/local/bin/gdk-pixbuf-thumbnailer doesn't exist on arch, it seems it's just at /usr/bin/gdk-pixbuf-thumbnailer Ah, yes, that's a good point. I operated under the assumption that a system installation is going to use `/usr` as a prefix. Sadly, gdk-pixbuf does not export the location of the thumbnailer program in the pkg-config file. I can fix that upstream, but it'll take a bit to be available in the various Linux distributions. For the time being, I can fix it manually: - search for `gdk-pixbuf-thumbnailer` in the `$PATH` and use that as the `Exec` value - add a build option in the `meson_options.txt` to let packagers override the location and name of the `gdk-pixbuf-thumbnailer` binary from the default, like the build already does for the `gdk-pixbuf-query-loaders` tool.

Actually, seems I was uneducated. Reading the guidelines for packaging with meson for Arch they specifically state I need to pass --prefix=/usr to meson. Doing so makes it install in the correct location using your first commit. Might want to revert or force push or something, sorry!

I can't get it to work in Thunar, Konqueror, Nautilus, or Dolphin. PCManFM, however, worked for some reason.

Actually, seems I was uneducated. Reading the guidelines for packaging with meson for Arch they specifically state I need to pass `--prefix=/usr` to meson. Doing so makes it install in the correct location using your first commit. Might want to revert or force push or something, sorry! I can't get it to work in Thunar, Konqueror, Nautilus, or Dolphin. PCManFM, however, worked for some reason.

Merged manually.

Merged manually.
Please reopen this pull request to perform merge operation.
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.