From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079336919717.tru64-unix-managers.marc@archive.invalid> From: Thomas Leitner Date: Tue, 29 Feb 2000 11:35:52 +0000 To: tru64-unix-managers Subject: Tru64 dtksh problems ........ X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079336919717 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 University of Technology, e-mail : tom@radar.tu-graz.ac.at Inffeldgasse 12 Phone : +43-316-873-7455 A-8010 Graz / Austria / Europe Fax : +43-316-463-697 Home page : http://wiis.tu-graz.ac.at/people/tom.html PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send mail with subject "get Thomas Leitner" to pgp-public-keys@keys.pgp.net -------------------------------------------------------------------------- Before we have the paperless office, we have the paperless toilet!