Eliminate rdp check causing black screen

This commit is contained in:
Ryan Hughes
2026-01-10 22:37:30 -05:00
parent fb1d9ccfa3
commit 7d77500c33

View File

@@ -254,25 +254,6 @@ remove_windows() {
echo "Windows VM removal completed!" echo "Windows VM removal completed!"
} }
wait_for_rdp_ready() {
local WIN_USER="$1"
local WIN_PASS="$2"
local TIMEOUT=240
SECONDS=0
echo "Waiting for Windows VM to be ready..."
while ! timeout 5s xfreerdp3 /auth-only /cert:ignore /u:"$WIN_USER" /p:"$WIN_PASS" /v:127.0.0.1:3389 &>/dev/null; do
sleep 2
if [ $SECONDS -gt $TIMEOUT ]; then
echo "❌ Timeout waiting for RDP!"
echo " The VM might still be installing Windows."
echo " Check progress at: http://127.0.0.1:8006"
return 1
fi
done
}
launch_windows() { launch_windows() {
KEEP_ALIVE=false KEEP_ALIVE=false
if [ "$1" = "--keep-alive" ] || [ "$1" = "-k" ]; then if [ "$1" = "--keep-alive" ] || [ "$1" = "-k" ]; then
@@ -310,19 +291,6 @@ launch_windows() {
exit 1 exit 1
fi fi
echo "Waiting for RDP to be ready..."
WAIT_COUNT=0
while ! nc -z 127.0.0.1 3389 2>/dev/null; do
sleep 2
WAIT_COUNT=$((WAIT_COUNT + 1))
if [ $WAIT_COUNT -gt 60 ]; then # 2 minutes timeout
echo "❌ Timeout waiting for RDP!"
echo " The VM might still be installing Windows."
echo " Check progress at: http://127.0.0.1:8006"
exit 1
fi
done
echo "Waiting for Windows VM to start..." echo "Waiting for Windows VM to start..."
WAIT_COUNT=0 WAIT_COUNT=0
until docker logs omarchy-windows 2>&1 | grep -qi "windows started successfully"; do until docker logs omarchy-windows 2>&1 | grep -qi "windows started successfully"; do
@@ -337,11 +305,6 @@ launch_windows() {
done done
fi fi
if ! wait_for_rdp_ready "$WIN_USER" "$WIN_PASS"; then
notify-send -u critical "Windows VM" "Did not come alive in time."
exit 1
fi
# Build the connection info # Build the connection info
if [ "$KEEP_ALIVE" = true ]; then if [ "$KEEP_ALIVE" = true ]; then
LIFECYCLE="VM will keep running after RDP closes LIFECYCLE="VM will keep running after RDP closes