Snap ignoring envrionment stanzas?

Been noodling around with the Kdenlive snap. I have snapcraft yaml on launchpad (so I can build in the cloud on 18.04), which built a snap on launchpad such as this one.

Running snap run kdenlive-devel gets.

Screenshot%20from%202018-09-26%2012-38-33

I went through the troubleshooting kdenlive/mlt whose first step is to run melt color:red, so I exposed the melt binary in the snap to the outside world, and tested thus:-

$ kdenlive-devel.melt
mlt_repository_init: no plugins found in "/snap/kdenlive-devel/x3/usr/lib/mlt/""
Usage: melt [options] [producer [name=value]* ]+
⋮
(snip)

As you can see from the output, it appears to be ignoring the fact that I set the environment in the environment: stanza. Anyone else seen this, where it seems the snap is ignoring the environment?

:baby_chick:

Hi,

I use environment variables in my snap:

Might be it helps. It works great, the splash-screen image and all plugins were found.

by,
Joël

1 Like

@kyrofa says snap run --shell should give me the right environment, and it does.

$ snap run --shell kdenlive-devel.melt
alan@hal:/home/alan$ env | grep MLT
MLT_PRESETS_PATH=/snap/kdenlive-devel/x3/usr/share/mlt/presets
MLT_MOVIT_PATH=/snap/kdenlive-devel/x3/usr/share/movit
MLT_REPOSITORY=/snap/kdenlive-devel/x3/usr/lib/mlt/"
MLT_DATA=/snap/kdenlive-devel/x3/usr/share/mlt/
MLT_PROFILES_PATH=/snap/kdenlive-devel/x3/usr/share/mlt/profiles

So could be a problem with mlt or the way I built it. The search continues!

Hi,

I am just curious about the content plug. I do now a build commented out the following:

plugs:
#  content:
#  target: /

Later, I tell you if plugins still are reachable.

Hi,
I would give the content plug a try. Thought, the plugins were found. The GtkFileChooser can’t access /usr, anymore. Even the layout extension mounts the directories.

Add it at these 2 locations and see what happens:


best regards,
Joël