NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problems with spawning windows



On 5/26/21 2:48 PM, Jason Mitchell wrote:
Hello,

    I'm having trouble with a set of scripts that launch different windows, running scripts that launch other windows. I made the following three simpler scripts as a test case. Here's what happens written out, just in case it helps someone follow along (actual scripts are below).

    testwin.sh opens an xterm and has the xterm run testwin2.sh. testwin2.sh then runs testwin3.sh which opens another xterm running rinetd.sh

    The problem is when testwin2.sh finishes the windows it spawned close as well. However, if I just run testwin2.sh from the command line this doesn't happen.

Obviously, I'm missing something here. What am I doing wrong? Just to be complete, I'm running this in a virtual X windows setup using Xvnc from TigerVNC. All of the applications are running from an embedded ram disk.

Thanks!

Jason M.


# uname -a
NetBSD ARMNUK 9.1 NetBSD 9.1 (ARMNUK) #0: Fri May  7 19:41:32 UTC 2021  root@BreakingBad:/root/obj/sys/arch/evbarm/compile/ARMNUK evbarm

#cat testwin.sh

#!/bin/sh
#. /system.conf
( /usr/X11R7/bin/rxvt -fn 6x13 -fb fixed -g 80x35+250+250 -e /usr/bin/testwin2.sh ) >>/config/tmp/winout.txt 2>>/config/tmp/winout.txt &


# cat testwin2.sh

#!/bin/sh
#. /system.conf
#showvar DISPLAY
sh /usr/bin/testwin3.sh  </dev/null &
echo "rinetd is running. Better catch it"
sleep 2


# cat testwin3.sh

#!/bin/sh
# $1 = number of service to start
. /system.conf
#. /usr/share/startup/6

#TORUN="$ATERM $XGEO -e $SCRIPT"
#showvar TORUN
#debug "Starting SERVICE$SERVICENUM ($PROG), $DESC"
#$TORUN &
( /usr/X11R7/bin/rxvt -fn 6x13 -fb fixed -g 80x25+0+0 -e /script/rinetds.sh ; ) </dev/null &
#wait
echoerr "That's all folks!"


As soon as I post something, I immediately figure out a solution. Testwin2.sh would produce error messages:

root@ARMNUK:/usr/bin# sh testwin2.sh
rinetd is running. Better catch it
stty: TIOCGLINED: Operation not supported
stty: TIOCGLINED: Operation not supported
That's all folks!

So adding stty sane to testwin.sh and testwin2.sh makes the test case work. But, it doesn't stop the error messages in my actual scripts. There this error shows up repeatedly:

stty: TIOCGLINED: Operation not supported

stty -kerninfo doesn't stop it either.

Thanks,

Jason M.



Home | Main Index | Thread Index | Old Index