Classic snaps failing on Ubuntu 17.10

I think @sergiusens is actually referring to this topic:

Note that it isn’t as simple as “not using desktop-launch” though. That will prevent LD_LIBRARY_PATH from being altered, but it is likely that many of the libraries desktop apps use will start searching for their plugins from the host system rather than those shipped with the snap.

I don’t have a good answer for this other than:

  1. rebuild GTK+ and all other libraries that have plugins to use a prefix of /snap/myapp/current/ so they’ll have the correct search path without setting an environment variable.

  2. modify the application to sanitise the environment before calling a subprocess. I’m not sure quite how you’d do this other than running something before desktop-launch to capture the pristine environment.

I don’t think there is an easy answer like using patchelf to modify rpaths.

1 Like