Yes, I’m back.
Back, back, back… Back again.
My little pet project - making the Amulet Map Editor into a Flatpak - has hit another stumbling block.
On my Linux Mint testing system, it runs mostly fine (still trying to figure out WTF is going on with textures - different ticket though). However on my new EndeavourOS system, it does not even start.
Aside from one being Gnome and the other KDE, Mint is X11, Ubuntu based while Endeavour is Wayland, Arch based.
I had assumed (apparently incorrectly) that this config would allow the Flatpak to run on both X11 and Wayland:
id: io.github.evilsupahfly.amulet_flatpak
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: amulet_map_editor
finish-args:
- --device=all
- --device=shm
- --allow=devel
- --allow=per-app-dev-shm
- --share=network
- --share=ipc
- --socket=wayland
- --socket=fallback-x11
- --filesystem=home:rw
- --filesystem=host
- --filesystem=host-os
- --persist=.cache
- --persist=/app/lib/python3.12/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix
- --env=LIBGL_ALWAYS_SOFTWARE="0"
- --env=OPENGL_VERSION=3.3
- --env=OPENGL_LIB=/usr/lib/x86_64-linux-gnu/libGL.so
- --env=XDG_CACHE_HOME=$HOST_XDG_CACHE_HOME
- --env=XDG_CONFIG_HOME=$HOST_XDG_CONFIG_HOME
- --env=XDG_STATE_HOME=$HOST_XDG_STATE_HOME
- --env=XDG_DATA_HOME=$HOST_XDG_DATA_HOME
modules:
- shared-modules/glew/glew.json
- shared-modules/glu/glu-9.json
- pip-gen.yaml
- name: metainfo-xml
buildsystem: simple
build-commands:
- install -Dm644 io.github.evilsupahfly.amulet_flatpak.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/
sources:
- type: file
path: io.github.evilsupahfly.amulet_flatpak.metainfo.xml
- name: metainfo-ico
buildsystem: simple
build-commands:
- install -Dm644 io.github.evilsupahfly.amulet_flatpak.png -t ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/
sources:
- type: file
path: share/icons/hicolor/256x256/apps/io.github.evilsupahfly.amulet_flatpak.png
- name: metainfo-desktop
buildsystem: simple
build-commands:
- install -Dm755 io.github.evilsupahfly.amulet_flatpak.desktop -t ${FLATPAK_DEST}/share/applications/
sources:
- type: file
path: share/applications/io.github.evilsupahfly.amulet_flatpak.desktop
# /AmuletMapEditor/resource_packs
- name: vanilla-textures
buildsystem: simple
build-commands:
- install -Dm644 vanilladefault_121.zip -t ${FLATPAK_DEST}/data/AmuletMapEditor/resource_packs/
sources:
- type: file
path: vanilladefault_121.zip
According to the official docs, if I set - --socket=wayland
and - --socket=fallback-x11
the host system’s Flatpak runner should first attempt to run using Wayland, then fall back to X11 if that doesn’t work, while choosing org.freedesktop.Platform
should make the app flexible enough to run on both Gnome and KDE.
However, on Endeavour, when I run the flatpak, I get this error in the terminal:
Unable to access X display, is $DISPLAY set properly?
When I type echo $DISPLAY
in Endeavour’s Konsole, I get :1
returned, so, what am I missing? Please tell me it’s not something super obvious.