Fonts issue (was: Re: App denied access to /lib and crashes)

Evan Dandrea evan.dandrea at canonical.com
Wed Jun 29 18:44:22 UTC 2016


On Wed, 29 Jun 2016 at 05:20 Pawel Stolowski <pawel.stolowski at canonical.com>
wrote:

>
> I'm trying to guess what font-related stuff may be missing. I've the
> following packages installed via stage-packages:
> - ttf-ubuntu-font-family
> - xfonts-base
> - xfonts-scalable
> - fontconfig-config
>
> Any idea what else to try?


If Tcl/Tk is loading fonts via absolute paths, including some font packages
in stage-packages unfortunately won't help. Any files in your snap will
install relative to /snap/your_snap/current, not /. Only files in the OS
snap can be installed to /.

I ran into this font problem with Jenkins. As it also uses fontconfig, I
provided a custom fonts.conf pointed at the needed fonts I put under the
snap directory [1, 2].

If that doesn't work and you need to dig deeper, I've found it useful to
run programs under ptrace and see what files they open (`strace -f -e
file`).

1:
https://github.com/evandandrea/jenkins-snap/blob/master/parts/plugins/x-jenkins.py#L12
2:
https://github.com/evandandrea/jenkins-snap/blob/master/snapcraft.yaml#L20
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160629/9b94caf9/attachment.html>


More information about the Snapcraft mailing list