From 7f3a3d1f81e710b7617f164ed467495580dcf4fc Mon Sep 17 00:00:00 2001
From: Frank Halasz
On Windows/Cygwin installations, FILE is specified in the Medley file system, not the host Windows file system.
+Useful only when using –vnc (and always on WSL1). When calling medley +as part of an automation script, often Medley will run for a very short +time (< a couple of seconds). This can cause issues with medley code +that detects Xvnc server failures. Setting this flag notifies Medley +that very short Medley sessions are possible and the Xvnc error +detection needs to be adjusted accordingly.
+3`FY#zUhp9o!$&d}~-<6^EdKoKQUXpltuE_aS>daKL9R*l~n#O*1*h&*bO{4hB zlit8B=VGNEIa>Pebo+q>*04lpzBk~_MZgYp?nRI%*}g~aumpoX;146R=3=ExSq&UV zP}(6qq>a~pbXiw15dIWOWm~6hNoQ8*UyH0IRkWFU=eh5%Y#Ct&<76-k$jNuNJAo8s ziG4t=%G|`SI4TWe(f$bW=n*XR0U!shx#7ejz;PWQ7Q*O?oL2tI&8k*f*>{jGq;B?- zHw^;FVLX%6`SQny#Zl6muu1>Q%Y0YEt1zbboagq}h0iUM-dL*doTYxK)VIzeT*Ipl z(L_tMZ67hk13w|;_f-v!RYdrt$2ZexNYn=!8zu9|8;|CWnttSHfS2F3B~H7AxmY)U zG>8PIKZ=Cb(fXbsYgnZ_7AI;sab1nRpeyJLI{r)#m_YLai1D^ 3{B#gD`T84` z-l9FvsLA(1^=tcd--BP@yP0&Y<$F_qfMj?~!Q!6$%c8DV)!y#z++dQN0JV0 c!FURjcTycBLuGS^8dM6#oH?Q9OGJ?O}BCi6F#FlgMFJdRK)_y(!0PtWh A)c^nh literal 5066 zcmV;*6E*A~iwFpUAE##k18rqwY-M>aF#ydwX>Z&(mf!g+h@f}j>Qu=|Iy1l+iv@fo zF2EOD?n#2!2vicQiffgmh?4E<-Tm+T4w9l&vg0&%FoW(SwnRR@`{Gk{^GfbFb+L|X zoy1wTkxP}UDy~&3=Now$=V_71-=eqCZz8&Rg@5FcTIgKKzsp6D*YH;*b)MmqdsWQ= z&U!2xqw}Ra mkl#n;1w z+ei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0#bVl`4KBnZ9cBwl9_d+53D2oFjr6wi@8y-bVGPP0fiB7A%l;)ihB6oBmK$Au^RO z>lK!qcrF0v(!n0XZuEzVo%ms5Cv9REiDR6(?zFkMZM2H>rE<-Pnx>_linmAO$jf2@ zLZF@i-ha@YOWhw2zQ)lQz8+6DNic_(E0x;9n#Oy(@FVeQO4BT^|JFO+_Q)1RgHzqT z?mC+7;N<`5(ec&s;UY;aS*<`=`d>*-Tzgo_xU{9E4NuH$ww~R6dn)y$TJ{)wtA3 z#<6KP-wFCZG`C6VP5{~6G`kC1(wZC_l${y+9WJumr1x0xl=8?Wf&(qO-mItr2cGtN z9Kxq{?2z4@DA=m;lO?`8(YCQj?%b;7OKG4GyVpbWsBC>d#83DpduJx}sc9rzcv8ZG z92!M|I?0`*BDqu5Xi%ZH<~)0PB?8C!vwG!JXKS`n>|@i^e+0pmoxiKJ-9VybOhZv+ zY%slVa+(X}QB2bJo}0xla)L{FdnXZo*wCBj >6U$3?`Pt6jV~a#|#z#Hg++*rM z=T JeZL2ZZXgEro{$yjAVApE6GoDL3ilFgLpzVozY zRj`?^W;55mADEDh#7tw7nNetHcLFP_3a^<|TxB|Z#YvB!x^+j0Cy!vI_W(I3$~5P# z9*(_WU?mJl oexV~))mxL5r1y;jhDHmxiev` z9=VL_uk&B?MZKv S?9z_6i~@z}Pr9IYEZmh7TbNNDj}zQzaNCAH z(8}opE&d7&gh1EPi1E<2Rvl8kMwGD26Ia&ep*kj|ia>kRBP_)-hCdQ8 iPs~t*J4MGJEnrR&`yPz1`iV#u_XFZtYHcUp($=TKu0jq+NcwntnXF=G&8^+*By) gon$26y?OWB1pa!DvhqNpqFRdo1BvXFuH8HU0Ii@1iU0rr diff --git a/docs/man-page/medley.1.md b/docs/man-page/medley.1.md index 28215964..425e6a30 100644 --- a/docs/man-page/medley.1.md +++ b/docs/man-page/medley.1.md @@ -216,7 +216,7 @@ specified in the Medley file system, not the host Windows file system. If the given value is "-", Medley will start up without using REM.CM file. There is no default Medley REM.CM file. - + On Windows/Cygwin installations, *FILE* is specified in the Medley file system, not the host Windows file system. @@ -254,10 +254,15 @@ for the parameter will be reset to the default value - which in the case of *Hos -cc \[*FILE* | -], \-\-repeat \[*FILE* | -] : Run Medley once. And then as long as *FILE* exists and is greater then zero length, repeatedly run Medley using *FILE* as the REM.CM file that Medley reads and executes at startup. Each run of Medley can change the contents of *FILE* to effect the subsequent run of Medley. To end the cycle, Medley needs to delete *FILE*. WIthin Medley, *FILE* can be found as the value of the environment variable LDEREPEATCM. - + On Windows/Cygwin installations, *FILE* is specified in the Medley file system, not the host Windows file system. +-am, --automation +: Useful only when using --vnc (and always on WSL1). When calling medley as part of an automation script, often Medley +will run for a very short time (< a couple of seconds). This can cause issues with medley code that detects Xvnc server failures. +Setting this flag notifies Medley that very short Medley sessions are possible and the Xvnc error detection needs to be adjusted accordingly. + Other Options ------------- diff --git a/scripts/loadups/loadup b/scripts/loadups/loadup index 631a7d16..ab84791e 100755 --- a/scripts/loadups/loadup +++ b/scripts/loadups/loadup @@ -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 diff --git a/scripts/loadups/loadup-setup.sh b/scripts/loadups/loadup-setup.sh index 47b0ba1a..0177dd08 100644 --- a/scripts/loadups/loadup-setup.sh +++ b/scripts/loadups/loadup-setup.sh @@ -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=$? } diff --git a/scripts/medley/medley.command b/scripts/medley/medley.command index 28ce293f..70a659b0 100755 --- a/scripts/medley/medley.command +++ b/scripts/medley/medley.command @@ -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 diff --git a/scripts/medley/medley_args.sh b/scripts/medley/medley_args.sh index eac7baa0..2c3ec04d 100755 --- a/scripts/medley/medley_args.sh +++ b/scripts/medley/medley_args.sh @@ -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 diff --git a/scripts/medley/medley_usage.sh b/scripts/medley/medley_usage.sh index e241ab16..a0346f91 100644 --- a/scripts/medley/medley_usage.sh +++ b/scripts/medley/medley_usage.sh @@ -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. diff --git a/scripts/medley/medley_vnc.sh b/scripts/medley/medley_vnc.sh index b578f859..df4f5fb4 100755 --- a/scripts/medley/medley_vnc.sh +++ b/scripts/medley/medley_vnc.sh @@ -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