From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f735abff1c6eb8db,start X-Google-Attributes: gidfee84,public From: Tom Leitner Subject: Tru64 Unix: dtksh acting weird .... Date: 2000/03/02 Message-ID: <89l5q6$rn2$1@fstgss02.tu-graz.ac.at>#1/1 X-Deja-AN: 592128363 X-Complaints-To: news@zid.tu-graz.ac.at X-Trace: fstgss02.tu-graz.ac.at 951982726 28386 129.27.138.63 (2 Mar 2000 07:38:46 GMT) Organization: Technische Universitaet Graz, Austria User-Agent: tin/1.5.1-20000103 ("Sumerland") (UNIX) (OSF1/V4.0 (alpha)) NNTP-Posting-Date: 2 Mar 2000 07:38:46 GMT Newsgroups: comp.unix.osf.osf1 [ This is a repost of the following article: ] [ From: Tom Leitner ] [ Subject: Tru64 Unix: dtksh acting weird .... ] [ Newsgroups: comp.unix.cde ] [ Message-ID: <89hb06$iu$1@fstgss02.tu-graz.ac.at> ] [ This is a repost of the following article: ] [ From: Tom Leitner ] [ Subject: Tru64 Unix: dtksh acting weird .... ] [ Newsgroups: comp.unix.shell ] [ Message-ID: <89gb6a$le9$1@fstgss02.tu-graz.ac.at> ] Hello, I've implemented a short dtksh script, appended below, which allows me to move certain windows on the CDE desktop to other workspaces automatically. This works without problems under Solaris 2.6 and Solaris 7. However I just can't get it to work under Tru64 4.0e,f and 5.0. It get all sorts of weird error messages which lead me to the conclusion that the script is somehow just cut off internally. The error messages depend, for instance on how many comment lines I've put at the beginning of the file. Here's what I get with the unmodified file below: $ cdesetws.sh xterm 2 cdesetws.sh: line 34: syntax error at line 39: ``' unmatched Any ideas anyone? I've tried for more than 2 hours now without any success. Is dtksh broken under Tru64? Thanks // Tom P.S: Here's the script. Under Solaris, it can be tested by starting an xterm with "xterm &". The xterm window can then be moved to, say, workspace #2 with "cdesetws.sh xterm 2" -------------- cdesetws.sh ----------- #!/usr/dt/bin/dtksh # $Id: cdesetws.sh,v 1.1 2000/02/29 11:28:10 tom Exp $ # --------------------------------------------------------------------------- # # File: cdesetws.sh # Desc: Move an existing window by name to a specified CDE workspace. # Usage: cdesetws.sh # # $Log: cdesetws.sh,v $ # Revision 1.1 2000/02/29 11:28:10 tom # Initial revision # # --------------------------------------------------------------------------- # if [ $# -ne 2 ]; then echo 'Usage: cdesetws.sh ' exit 1 fi wname=$1 wsn=$2 # # get the window number # XWI=`which xwininfo` echo $XWI | grep found >/dev/null 2>/dev/null if [ $? -ne 0 ]; then XWI= if [ -x /usr/bin/X11/xwininfo ]; then XWI=/usr/bin/X11/xwininfo fi if [ -x /usr/openwin/bin/xwininfo ]; then XWI=/usr/openwin/bin/xwininfo fi if [ "$XWI" = "" ]; then echo "** ERROR: cdesetws.sh cannot find xwininfo !!" exit 1 fi fi WIN=`$XWI -name $wname 2>/dev/null | grep "Window id:" | awk '{ print $4 }'` if [ "$WIN" = "" ]; then echo "** ERROR: cdesetws.sh cannot find window name $wname !!" exit 1 fi # # init X and move the window. # XtInitialize TOPLEVEL cdesetws Dtksh $0 2>/dev/null XtDisplay DISP $TOPLEVEL XtScreen SCREEN $TOPLEVEL XRootWindowOfScreen RWIN $SCREEN DtWsmGetWorkspaceList $DISP $RWIN WSALL if [ "$WSALL" != "" ]; then WS=`echo $WSALL | tr , "\\n" | head -$wsn | tail -1` DtWsmSetWorkspacesOccupied $DISP $WIN $WS fi XFlush $DISP XSync $DISP false exit 0 # # end of file -- Dr. Tom Leitner Dept. of Communications, Graz Univ. of Technology, tom@radar.tu-graz.ac.at Inffeldgasse 12, A-8010 Graz / Austria / Europe PGP public key @ http://wiis.tu-graz.ac.at/people/tom.html