Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
Created September 18, 2025 23:39
Show Gist options
  • Save lidgnulinux/4156f917c08d3f6cca5b1f9dc3de69ab to your computer and use it in GitHub Desktop.
Save lidgnulinux/4156f917c08d3f6cca5b1f9dc3de69ab to your computer and use it in GitHub Desktop.
bwrap example to launch firefox.
bwrap --bind /home/lfs/browser / \
--dev /dev \
--proc /proc \
--bind /sys /sys \
--bind /run /run \
--bind /home/lfs/.mozilla /home/lfs/.mozilla \
--bind /home/lfs/Downloads /home/lfs/Downloads \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/passwd /etc/passwd \
--ro-bind /etc/group /etc/group \
--ro-bind /tmp/.X11-unix tmp/.X11-unix \
--ro-bind /usr/share/icons /usr/share/icons \
--ro-bind /usr/share/libdrm /usr/share/libdrm \
--ro-bind /usr/share/mime /usr/share/mime \
--ro-bind /usr/share/X11/xkb /usr/share/X11/xkb \
--ro-bind /usr/share/icons /usr/share/icons \
--ro-bind /usr/share/mime /usr/share/mime \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /usr/etc/ssl/certs/ /usr/etc/ssl/certs/ \
--ro-bind /etc/ssl /etc/ssl \
--setenv DISPLAY $DISPLAY \
--setenv HOME /home/lfs \
/usr/bin/firefox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment