Skip to content

Add support for apx exports to work from within flatpak application #461

@jokerejoker

Description

@jokerejoker

I will suggest to extend the export script to also support being executed from within a flatpak application, like IntelliJ, by testing for $FLATPAK_ID in the export script.

#!/bin/sh
# distrobox_binary
# name: apx-ubuntu
this=$(realpath $0)
if [ -n "$FLATPAK_ID" ]; then
	exec "/usr/bin/flatpak-spawn" --host "/usr/share/apx/distrobox/distrobox-enter" -n apx-ubuntu -- $this "$@"
elif [ -z "${CONTAINER_ID}" ]; then
	exec "/usr/share/apx/distrobox/distrobox-enter"  -n apx-ubuntu  --  $this "$@"
elif [ -n "${CONTAINER_ID}" ] && [ "${CONTAINER_ID}" != "apx-ubuntu" ]; then
	exec distrobox-host-exec $this "$@"
else
	exec '/usr/bin/docker' "$@"
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions