FLTK applications cannot start

Bug #1697473 reported by Michael R Sweet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Hi,

I'm trying to create snaps for two FLTK-based applications I maintain (rasterview and HTMLDOC) but when I run these applications I get two error messages:

    XOpenIM() failed
    Unable to find fonts. Check your FontConfig configuration.

Both applications list the "x11" and "unity7" interfaces in the plugs: value in snapcraft.yaml, but neither will open a window. (HTMLDOC also has a command-line mode, and that works just fine...)

The projects are hosted on Github:

    https://github.com/michaelrsweet/htmldoc
    https://github.com/michaelrsweet/rasterview

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

You're not setting the environment correctly for FLTK to find assets such as fonts. You can do this by hand, but I've had success using the desktop-gtk3 part to do it. Something like this:

    parts:
      my-fltk-part:
        # ...
        after: [desktop-gtk3]

    apps:
      my-fltk-app:
        command: desktop-launch <real command>

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Michael R Sweet (msweet) wrote :

I made the suggested changes and this is the error I am getting:

    /snap/htmldoc/3/bin/desktop-launch: line 309: /home/mike/c/htmldoc/bin/htmldoc: No such file or directory

Thoughts?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snapcraft because there has been no activity for 60 days.]

Changed in snapcraft:
status: Incomplete → Expired
John Lenton (chipaca)
Changed in snapcraft:
status: Expired → New
Revision history for this message
Michael R Sweet (msweet) wrote :

Adding $SNAP in front of the command path seems to have done the job:

apps:
    htmldoc:
        command: desktop-launch $SNAP/bin/htmldoc
        desktop: share/applications/htmldoc.desktop
        plugs: [home, network, x11]

parts:
    main:
        plugin: autotools
        source: .
        after: [desktop-gtk3]

build-packages: [libfltk1.3-dev]

I think this needs to be included in the documentation/examples (not specifically the FLTK parts, but the command and after bits are VERY hard to find!)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.