mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-01 03:53:45 +08:00
devcontainer: expose host config, fix mac screen issues (#29932)
* 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
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user