Add prunw command to run containers with Wayland/X11

This commit is contained in:
Anthony Rose 2022-07-23 18:41:20 +01:00
parent 57460d8df9
commit 3789eca326

View file

@ -154,7 +154,25 @@ then
fi
# Useful aliases for Podman.
alias prun="podman run --rm --interactive --tty"
_podman_cli_args=(
--rm
--interactive
--tty
)
_podman_desktop_args=(
--security-opt label=disable
--volume /tmp/.X11-unix/:/tmp/.X11-unix/
-env DISPLAY=:0
-volume $XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR
-env XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR
-env XDG_SESSION_TYPE=wayland
-env MOZ_ENABLE_WAYLAND=1
--ipc host
)
alias prun="podman run ${_podman_cli_args[@]}"
alias prunw="podman run ${_podman_cli_args[@]} ${_podman_desktop_args[@]}"
unset _podman_desktop_args
unset _podman_cli_args
# Desktop files (used by desktop environments within both X11 and Wayland) are
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for