gamsufa
January 11, 2020, 11:12pm
1
I have an app that depends on chromium.
I have added in snapcraft.yml:
- stage-snaps: [chromium]
it packaged and released successfully (+140mb to the snap size).
But when running, my app fails to find chromium in path. How could I access/link that?
Source for app (without chromium): https://github.com/lawzava/scrape
oSoMoN
January 14, 2020, 5:50pm
2
Where does the chromium snap end up in your snap’s filesystem hierarchy?
Seems the documentation is lacking some, but the release notes where stage-snaps are introduced describe this.
I will make sure the release notes get updated.
oSoMoN
January 15, 2020, 2:30pm
4
Ok, so if I read this correctly at the root of your snap’s filesystem there will be the command-chromium.wrapper
script, which is what you should use to launch chromium. Your app might need to be patched to run that script instead of looking for a chromium
or chromium-browser
binary.
Understood, so just aim for the absolute path as /command-chromium.wrapper
?
oSoMoN
January 16, 2020, 8:50pm
6
Or rather, $SNAP/command-chromium.wrapper
.
Please don’t rely on the existence of that wrapper, it is a snapcraft implementation detail that can go away.
oSoMoN
January 20, 2020, 11:17am
8
Right, so use the contents of that wrapper script:
exec "$SNAP/bin/desktop-launch" "$SNAP/bin/chromium.launcher" "$@"