container_post_start.sh 489 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. source .devcontainer/.host/.env
  3. # setup safe directories for submodules
  4. SUBMODULE_DIRS=$(git config --file .gitmodules --get-regexp path | awk '{ print $2 }')
  5. for DIR in $SUBMODULE_DIRS; do
  6. git config --global --add safe.directory "$PWD/$DIR"
  7. done
  8. # virtual display for virtualgl
  9. if [[ "$HOST_OS" == "darwin" ]] && [[ -n "$HOST_DISPLAY" ]]; then
  10. echo "Starting virtual display at :99 ..."
  11. tmux new-session -d -s fakedisplay Xvfb :99 -screen 0 1920x1080x24
  12. fi