cat ~/.local/bin/bfirefox
bwrap \
--hostname localhost \
--unshare-all \
--share-net \
--die-with-parent \
--new-session \
--clearenv \
--setenv HOME "$HOME" \
--setenv GTK_THEME Adwaita:dark \
--setenv MOZ_ENABLE_WAYLAND 1 \
--setenv WAYLAND_DISPLAY "$WAYLAND_DISPLAY" \
--setenv XDG_RUNTIME_DIR "$XDG_RUNTIME_DIR" \
--setenv DBUS_SESSION_BUS_ADDRESS "unix:path=$XDG_RUNTIME_DIR/bus" \
--dev /dev \
--dev-bind /dev/dri /dev/dri \
--proc /proc \
--tmpfs /tmp \
--symlink usr/lib /lib \
--symlink usr/lib64 /lib64 \
--ro-bind /usr/lib /usr/lib \
--ro-bind /usr/lib64 /usr/lib64 \
--ro-bind /usr/share/gtk-3.0 /usr/share/gtk-3.0 \
--ro-bind /usr/share/fontconfig /usr/share/fontconfig \
--ro-bind /usr/share/fonts /usr/share/fonts \
--ro-bind /usr/share/icons /usr/share/icons \
--ro-bind /usr/share/mime /usr/share/mime \
--ro-bind-try /usr/share/icu /usr/share/icu \
--ro-bind /usr/share/drirc.d /usr/share/drirc.d \
--ro-bind /usr/share/glib-2.0 /usr/share/glib-2.0 \
--ro-bind /usr/share/glvnd /usr/share/glvnd \
--ro-bind /usr/share/libdrm /usr/share/libdrm \
--ro-bind /usr/share/X11/xkb /usr/share/X11/xkb \
--ro-bind /usr/share/ca-certificates /usr/share/ca-certificates \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/ssl /etc/ssl \
--ro-bind /etc/fonts /etc/fonts \
--ro-bind /etc/ca-certificates /etc/ca-certificates \
--dir /run/user/"$(id -u)" \
--ro-bind /sys/dev/char /sys/dev/char \
--ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--ro-bind "${XDG_RUNTIME_DIR}/pulse/" "${XDG_RUNTIME_DIR}/pulse/" \
--bind "${XDG_RUNTIME_DIR}/dconf/" "${XDG_RUNTIME_DIR}/dconf/" \
--ro-bind "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}" "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}" \
--ro-bind "$XDG_RUNTIME_DIR/bus" "$XDG_RUNTIME_DIR/bus" \
--bind ~/.mozilla ~/.mozilla \
--bind ~/.config/dconf/ ~/.config/dconf/ \
--bind ~/Downloads ~/Downloads \
--bind-try ~/mnt ~/mnt \
--ro-bind ~/opt/firefox ~/opt/firefox \
--ro-bind ~/.local/share/fonts/ ~/.local/share/fonts/ \
--ro-bind ~/.config/fontconfig ~/.config/fontconfig \
~/opt/firefox/firefox "$@"
src::
https://wiki.archlinux.org/title/Bubblewrap
https://wiki.alpinelinux.org/wiki/Bubblewrap
https://wiki.archlinux.org/title/Bubblewrap/Examples
https://wiki.alpinelinux.org/wiki/Bubblewrap/Examples
Comments
Post a Comment