From b3e218af9082e54399ce69e82802ccf755a6c841 Mon Sep 17 00:00:00 2001 From: Luca Di Maio Date: Mon, 18 Sep 2023 18:36:12 +0200 Subject: [PATCH] host-exec: setup XDG_RUNTIME_DIR after download prompt, fix installation in init Signed-off-by: Luca Di Maio --- distrobox-host-exec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/distrobox-host-exec b/distrobox-host-exec index 938924c5ce..915f7bffb3 100755 --- a/distrobox-host-exec +++ b/distrobox-host-exec @@ -140,12 +140,6 @@ elif command -v wget > /dev/null 2>&1; then download_command="wget -qO" fi -# This makes host-spawn work on initful containers, where the dbus session is -# separate from the host, we point the dbus session straight to the host's socket -# in order to talk with the org.freedesktop.Flatpak.Development.HostCommand on the host -XDG_RUNTIME_DIR="/run/host/${XDG_RUNTIME_DIR}" -DBUS_SESSION_BUS_ADDRESS="unix:path=/run/host/$(echo "${DBUS_SESSION_BUS_ADDRESS}" | cut -d '=' -f2-)" - # Setup host-spawn as a way to execute commands back on the host if ! command -v host-spawn > /dev/null || [ "$(printf "%s\n%s\n" "${host_spawn_version}" "$(host-spawn --version)" | @@ -189,6 +183,12 @@ if ! command -v host-spawn > /dev/null || fi +# This makes host-spawn work on initful containers, where the dbus session is +# separate from the host, we point the dbus session straight to the host's socket +# in order to talk with the org.freedesktop.Flatpak.Development.HostCommand on the host +XDG_RUNTIME_DIR="/run/host/${XDG_RUNTIME_DIR}" +DBUS_SESSION_BUS_ADDRESS="unix:path=/run/host/$(echo "${DBUS_SESSION_BUS_ADDRESS}" | cut -d '=' -f2-)" + ### # This workaround is needed because of a bug in gio (used by xdg-open) where # a race condition happens when allocating a pty, leading to the command