1
0
mirror of synced 2026-01-25 20:06:44 +00:00

Fix Issue #2148: loadups fail on WSL1 with Xvnc server errors - fixed by adding new flag to medley script, use this flag in loadup script (#2163)

* Fix Issue #2155 (loadup -f -b -x fails can't find full.sysout).  Reordered loadup so that the sysouts are copied to loadups before loadup-aux and loadup-db are run, and that the product of loadup-aux are copied to loadups before loadup-db is run -- all to make sure that the right prerequisites are available in loadups when needed.  Also forced a run of loadup-aux if full.sysout is newer than exports.all when -db is specified.

* Fix Issue 2148 - loadups fail on WSL1 with Xvnc server error.  Root cause of 2148 is that certain Medley sessions in loadups run very quickly - less that a second or 2.  This causes the medley script to improperly detect an Xvnc server error.  Fixed by adding a cli flag --automation that forces the medley script to skip the check for Xvnc server errors.  Changed loadup script to call medley with this flag set.  Also add a cl flag to loadup --forcevnc that forces loadup to use vnc even on WSL2.  This is intended for testing purposes only.
This commit is contained in:
Frank Halasz
2025-06-16 20:23:40 -07:00
committed by GitHub
parent 30af8ea5cb
commit 7f3a3d1f81
10 changed files with 47 additions and 4 deletions

View File

@@ -157,6 +157,11 @@ main() {
# internal
noendmsg=true
;;
--forcevnc)
# internal - for testing
# WSL only -otherwise warning msg from medley
force_vnc="+"
;;
-z | -man | --man )
if [ "$(uname)" = "Darwin" ]
then

View File

@@ -161,6 +161,7 @@ loadup_finish () {
exit ${exit_code}
}
force_vnc="-"
run_medley () {
/bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \
--config - \
@@ -171,6 +172,8 @@ run_medley () {
--rem.cm "${cmfile}" \
--greet "${initfile}" \
--sysout "$1" \
--automation \
--vnc "${force_vnc}" \
"$2" "$3" "$4" "$5" "$6" "$7" ;
exit_code=$?
}

View File

@@ -586,6 +586,8 @@ flags:
-x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley
-am | --automation : this call to medley is being used in automation, adjust timings. Relevant in -vnc case only.
-cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname.
-cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file.
@@ -638,6 +640,7 @@ pixelscale_arg=""
borderwidth_arg=""
remcm_arg="${LDEREMCM}"
repeat_cm=""
automation=false
# Add marker at end of args so we can accumulate pass-on args in args array
set -- "$@" "--start_of_pass_args"
@@ -915,6 +918,9 @@ do
fi
exit 0
;;
-am | --automation)
automation=true
;;
-nf | -NF | --nofork)
# for use in loadups
case $2 in
@@ -1702,7 +1708,7 @@ do
"$(ip_addr)":"${VNC_PORT}" \
>>"${LOG}" 2>&1 &
wait $!
if [ $(( $(date +%s) - start_time )) -lt 5 ]
if [ "${automation}" = false ] && [ $(( $(date +%s) - start_time )) -lt 5 ]
then
if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ]
then

View File

@@ -48,6 +48,7 @@ pixelscale_arg=""
borderwidth_arg=""
remcm_arg="${LDEREMCM}"
repeat_cm=""
automation=false
# Add marker at end of args so we can accumulate pass-on args in args array
set -- "$@" "--start_of_pass_args"
@@ -325,6 +326,9 @@ do
fi
exit 0
;;
-am | --automation)
automation=true
;;
-nf | -NF | --nofork)
# for use in loadups
case $2 in

View File

@@ -115,6 +115,8 @@ flags:
-x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley
-am | --automation : this call to medley is being used in automation, adjust timings. Relevant in -vnc case only.
-cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname.
-cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file.

View File

@@ -215,7 +215,7 @@
"$(ip_addr)":"${VNC_PORT}" \
>>"${LOG}" 2>&1 &
wait $!
if [ $(( $(date +%s) - start_time )) -lt 5 ]
if [ "${automation}" = false ] && [ $(( $(date +%s) - start_time )) -lt 5 ]
then
if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ]
then