Skip to content

Conversation

@heftig
Copy link
Contributor

@heftig heftig commented Sep 28, 2025

A recent GDK-PixBuf with Glycin will attempt to spawn sandboxed loaders,
which needs `bwrap` from the PATH.
As mentioned in the bugs referenced, clearing the pixbuf in the prepared
signal is not a valid thing to do.

See: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/75ac8deaf04f362efa5fc0ace51031350e70e8be
Closes: BestImageViewer#1921

echo "Variables in isolated environment:" >&2
env -i G_DEBUG="$G_DEBUG" HOME="$HOME" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" dbus-run-session -- env >&2
env -i G_DEBUG="$G_DEBUG" HOME="$HOME" PATH="$PATH" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" dbus-run-session -- env >&2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this solution. The intent of this script is to create a sandbox where (especially) the geeqie being tested cannot interact with other versions of geeqie that might be installed on the system (including in the default PATH). Passing PATH through unmodified creates a hole in that sandbox.

Would it be possible to symlink bwrap into the sandbox and add that to the sandbox PATH? Something like

SANDBOX_PATH="${HOME}/bin"
mkdir -p "$SANDBOX_PATH"
# If `bwrap` is installed, symlink it into the sandbox PATH.  Used by glycin GdkPixuf.
if which bwrap > /dev/null; then
    ln -s "$(which bwrap)" "${SANDBOX_PATH}/"
fi
[...]
env [...] PATH="$SANDBOX_PATH"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to fix GdkPixbuf bug already.
Is it possible to merge this partially, i.e. just commit Stop overwriting prepared image data?
Another option is merge whole PR and apply @xsdg suggestion later in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants