How to enable pi image paste via portal wrapper
Goal
Make image paste work transparently in pi sessions using portal-backed wl-paste wrapper.
Requirements
- Portal enabled in
~/.agent-box.toml - If
[portal].global = true,agent-portal-hostrunning on host - Wrapper binary (
wl-paste) available in container PATH before systemwl-paste
Steps
- Choose a Portal mode:
Global mode:
[portal]
enabled = true
global = true
Managed per-container mode:
[portal]
enabled = true
global = false
- If using global mode, start portal host:
agent-portal-host
- Spawn with Agent-box (portal enabled):
ab spawn -s my-session
- In container/session env:
export WAYLAND_DISPLAY=wayland-1
# AGENT_PORTAL_SOCKET is injected by ab when portal is enabled
- Validate wrapper flow:
wl-paste --list-types
wl-paste --type image/png --no-newline
Notes
- Policy is enforced host-side by
agent-portal-host. - Wrapper should not prompt in-container.