SUMMARY: xdm and OpenWindows, part 2

From: Dave Sill (de5@stc06.ctd.ornl.gov)
Date: Mon Oct 14 1991 - 12:48:24 CDT


I my recent summary about running xdm with OpenWindows I mentioned
problems with two things: OW cmdtool and SunView compatability. I
received a dozen very helpful replies.

The cmdtool problem, which was that cmdtools invoked under an xdm
session didn't accept input, is solved by running cmdtool with
"setsid". Most folks suggested replacing
/usr/openwin/bin/xview/cmdtool with a shell script wrapper. Mic
Kaczmarczik sent me nice shar file to set this all up. It's included
at the end of this message.

The solution to running SunView applications under xdm sessions
similarly involves prefixing them with "svenv -exec". For example, to
run traffic:

        % svenv -exec /usr/bin/traffic

Tad Guy also suggested:

"... `svenv -env', when running under xdm, produces garbage values for
WINDOW_TTYPARMS. I modified mine to set the variable to a static
value..."

I now have a fully functioning OpenWindows under xdm configuration.

Thanks to:

dupuy@hudson.cs.columbia.edu (Alexander Dupuy)
macphed@dvinci.usask.ca (Ian MacPhedran)
Mic Kaczmarczik <mic@emx.utexas.edu>
simon@liasun3.epfl.ch (Simon Leinen)
"(Alain Brossard EPFL-SIC/SII)" <brossard@sasun1.epfl.ch>
drl@vuse.vanderbilt.edu
steele@tiger.ICD.Teradyne.COM (Alan Steele)
Peter Koblauch <koblauch@waterloo.hp.com>
Tad Guy <tadguy@ab00.larc.nasa.gov>
Ken Erickson <ken@kericks.chi.il.us>
rrb@nch.NORASIA.COM (R.R.Buonanno)
gaw@aeg.dsto.oz.au (Grant Ward)

#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: README cmdtool.sh
# Wrapped by mic@emx.utexas.edu on Wed Oct 2 14:49:10 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(993 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
XDescription:
X
XIf you want to run cmdtool or shelltool via rsh(1) or from xdm(X11),
Xyou need to establish a controlling terminal for the program to dissociate
Xthe tty subwindow from. Otherwise, the program reports TIOCSPGRP errors,
Xand the doesn't see any keyboard input.
X
XThe shell script in this directory uses setsid(2V) to establish a terminal
Xsession ID for cmdtool/shelltool, which seems to do the trick. At least
Xnow I can invoke shelltool from my window manager when logging in via
Xxdm.
X
XInstallation:
X
XInstalling this hack requires that you move the cmdtool binary somewhere
Xother than $OPENWINHOME/bin/xview. I put it in the subdirectory .bin for
Xconvenience.
X
X cp cmdtool.sh $OPENWINHOME/bin/xview # copy the wrapper
X mkdir $OPENWINHOME/bin/xview/.bin # create area for real binary
X cd $OPENWINHOME/bin/xview/.bin # go there
X mv ../cmdtool . # save real cmdtool
X mv ../cmdtool.sh cmdtool # replace it with cmdtool.sh
X ln -s cmdtool shelltool # remake symlink for shelltool
END_OF_FILE
if test 993 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'cmdtool.sh' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"'cmdtool.sh'\"
else
echo shar: Extracting \"'cmdtool.sh'\" \(339 characters\)
sed "s/^X//" >'cmdtool.sh' <<'END_OF_FILE'
X#!/bin/sh
X#
X# @(#)cmdtool.sh 1.2 10/16/90 (cc.utexas.edu) /tmp_mnt/usr/share/src/public/sun/fixes/remote-cmdtool/SCCS/s.cmdtool.sh
X#
X# Wrapper for cmdtool and shelltool that establishes a session leader for
X# the process. See setsid(8V) for details.
X#
Xexec /usr/etc/setsid -b ${OPENWINHOME-/usr/openwin}/bin/xview/.bin/`basename $0` "$@"
END_OF_FILE
if test 339 -ne `wc -c <'cmdtool.sh'`; then
    echo shar: \"'cmdtool.sh'\" unpacked with wrong size!
fi
# end of 'cmdtool.sh'
fi
echo shar: End of shell archive.
exit 0

--
Dave Sill (de5@ornl.gov)	  Tug on anything in nature and you will find
Martin Marietta Energy Systems    it connected to everything else.
Workstation Support                                             --John Muir



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:18 CDT