mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
109515a208
* export host config via .host/.env file. fix mac display issues * append instead of replace for bashrc * Log when mac display override happens * Update xauthority path in json old-commit-hash: dd26a1faadb4cb6a468b77d5be7803cf1dad4beb
15 lines
349 B
Bash
Executable File
15 lines
349 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source .devcontainer/.host/.env
|
|
|
|
# override display flag for mac
|
|
if [[ $HOST_OS == darwin ]]; then
|
|
echo "Setting up DISPLAY override for macOS..."
|
|
cat <<EOF >> /root/.bashrc
|
|
if [ -n "\$DISPLAY" ]; then
|
|
DISPLAY_NUM=\$(echo "\$DISPLAY" | awk -F: '{print \$NF}')
|
|
export DISPLAY=host.docker.internal:\$DISPLAY_NUM
|
|
fi
|
|
EOF
|
|
fi
|