SUMMARY: xdm and OpenWindows, part 2

From: Dave Sill (
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

I now have a fully functioning OpenWindows under xdm configuration.

Thanks to: (Alexander Dupuy) (Ian MacPhedran)
Mic Kaczmarczik <> (Simon Leinen)
"(Alain Brossard EPFL-SIC/SII)" <>
steele@tiger.ICD.Teradyne.COM (Alan Steele)
Peter Koblauch <>
Tad Guy <>
Ken Erickson <>
rrb@nch.NORASIA.COM (R.R.Buonanno) (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
# Wrapped by 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'\"
echo shar: Extracting \"'README'\" \(993 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
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.
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
XInstalling this hack requires that you move the cmdtool binary somewhere
Xother than $OPENWINHOME/bin/xview. I put it in the subdirectory .bin for
X cp $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 # replace it with
X ln -s cmdtool shelltool # remake symlink for shelltool
if test 993 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
# end of 'README'
if test -f '' -a "${1}" != "-c" ; then
  echo shar: Will not clobber existing file \"''\"
echo shar: Extracting \"''\" \(339 characters\)
sed "s/^X//" >'' <<'END_OF_FILE'
X# @(#) 1.2 10/16/90 ( /tmp_mnt/usr/share/src/public/sun/fixes/remote-cmdtool/SCCS/
X# Wrapper for cmdtool and shelltool that establishes a session leader for
X# the process. See setsid(8V) for details.
Xexec /usr/etc/setsid -b ${OPENWINHOME-/usr/openwin}/bin/xview/.bin/`basename $0` "$@"
if test 339 -ne `wc -c <''`; then
    echo shar: \"''\" unpacked with wrong size!
# end of ''
echo shar: End of shell archive.
exit 0

Dave Sill (	  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