Skip to content

Commit

Permalink
init: auto-link /usr/bin/flatpak, to better support opening links on …
Browse files Browse the repository at this point in the history
…host's browser, if those are flatpaks

Signed-off-by: Luca Di Maio <[email protected]>
  • Loading branch information
89luca89 committed Jun 28, 2024
1 parent d0b93f6 commit fcc2972
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions distrobox-init
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,15 @@ if ! command -v xdg-open; then
mkdir -p /usr/local/bin/
ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/xdg-open
fi

# If flatpak is not present, do a link of it. This is handy to handle opening of
# links, files and apps from inside the container into the host.
# Note: we're using /usr/bin instead of /usr/local/bin because xdg-open will read
# the desktopfile, which will contain an absolute path of /usr/bin/flatpak
if ! command -v flatpak; then
ln -sf /usr/bin/distrobox-host-exec /usr/bin/flatpak
fi

###############################################################################

# Ensure compatibility with older versions of su, this will allow to specify
Expand Down

0 comments on commit fcc2972

Please sign in to comment.