[comp.windows.open-look] Help with SunSO OpenWindows 2.0 window manager and Saber C

lwv27@CAS.BITNET (Larry W. Virden ext. 2487) (05/07/91)

Hello!

        I have a specific problem which I believe is an example of
a general condition.  I am using SunOS 4.1.1 and the OW that comes
with that distribution.  I am using Saber-C - Version 3.0.1 .

        I have the following as one line of many within my
$HOME/.openwin-menu file:

    "Saber-C"                   xsaber &

        I have tried just xsaber, exec xsaber, and the above.  In
each case, I see the outline of the primary window, but before
any text appears, the windows go away.

        When I look in the xterm -C window, there is no output.

        How can one start programs so that stderr type messages
appear SOMEWHERE?  And of course, how do we find that somewhere :-) .

Thanks!
--
Larry W. Virden                 UUCP: osu-cis!chemabs!lwv27
Same Mbox: BITNET: lwv27@cas    INET: lwv27%cas.BITNET@CUNYVM.CUNY.Edu
Personal: 674 Falls Place,   Reynoldsburg,OH 43068-1614
America Online: lvirden

doehr@magellan.den.mmc.com (Brett B. Doehr) (05/08/91)

In article <9105070650.AA2220@cas.org>, lwv27@CAS.BITNET (Larry W. Virden ext. 2487) writes:
|> Hello!
|> 
|>         I have a specific problem which I believe is an example of
|> a general condition.  I am using SunOS 4.1.1 and the OW that comes
|> with that distribution.  I am using Saber-C - Version 3.0.1 .
|> 
|>         I have the following as one line of many within my
|> $HOME/.openwin-menu file:
|> 
|>     "Saber-C"                   xsaber &
|> 
|>         I have tried just xsaber, exec xsaber, and the above.  In
|> each case, I see the outline of the primary window, but before
|> any text appears, the windows go away.
|> 
I have run into a similar problem.  I am running SunOS 4.1.1 and OW2.0,
and using Saber-C++ version 1.0.1 .  I added to the Your Commands submenu
of the File Manager's File menu the command	xsaberc++ &
and sure enough, the outline of Saber's main window comes up, goes away.
No error message in the console window or at bottom of the File Manager
window.  Similar commands for other things (e.g.,  guide &) work fine.
Please post any ideas for the cause.


--Brett.

============================================================|
Brett B. Doehr           Martin Marietta Astronautics Group |
Voice: (303) 977-1504           Internet: doehr@den.mmc.com |
Fax:   (303) 977-1530               America Online: BrettBD |
    "Writing software that only a mother could love..."     |
============================================================|

baumgart@esquire.dpw.com (Steve Baumgarten) (05/08/91)

In article <9105070650.AA2220@cas.org> lwv27@CAS.BITNET (Larry W. Virden ext. 2487) writes:

	   I have the following as one line of many within my
   $HOME/.openwin-menu file:

       "Saber-C"                   xsaber &

	   I have tried just xsaber, exec xsaber, and the above.  In
   each case, I see the outline of the primary window, but before
   any text appears, the windows go away.

	   When I look in the xterm -C window, there is no output.

	   How can one start programs so that stderr type messages
   appear SOMEWHERE?  And of course, how do we find that somewhere :-) .

I believe that Saber C can only be started by running it in an xterm
window (i.e., typing "xsaber &" by hand), not from an olwm menu.  Twm
has the same problem, by the way.  

The Saber manual explains the technical details, but when I was using
twm and tried launching it from a twm menu, the exact same thing
happened.

--
   Steve Baumgarten             | "New York... when civilization falls apart,
   Davis Polk & Wardwell        |  remember, we were way ahead of you."
   baumgart@esquire.dpw.com     | 
   cmcl2!esquire!baumgart       |                           - David Letterman

siegel@cs.columbia.edu (David Siegel) (05/09/91)

When testing Saber-C++, I noticed very peculiar behavior when trying to
use Emacs as the windowed editor -- commands seemed to be going to an
intermediary window that Saber tried to interpose between itself and Emacs.

Other strangeness also occured in that window (formatting peculiarities, etc.).

I think Saber is doing some questionable things in their X interface.

-dms

warsaw@nlm.nih.gov (Barry A. Warsaw) (05/09/91)

>>>>> "Brett" == Brett B. Doehr <doehr@magellan.den.mmc.com> writes:

	Brett> I am running SunOS 4.1.1 and OW2.0, and using Saber-C++
	Brett> version 1.0.1 . I added to the Your Commands submenu of
	Brett> the File Manager's File menu the command	xsaberc++ & and
	Brett> sure enough, the outline of Saber's main window comes up,
	Brett> goes away.  No error message in the console window or at
	Brett> bottom of the File Manager window.  Similar commands for
	Brett> other things (e.g., guide &) work fine.  Please post any
	Brett> ideas for the cause.

I believe the cause is a bug in SaberC++.  The X version must have a
controlling terminal to come up, which means you cannot start it up
from a menu.  I have the same problem running SaberC++ from a twm root
menu.  You have to start it up from an xterm or emacs shell -- in that
case it works fine.  Hopefully this will be fixed in future versions
-- I think Saber has indicated as much.

-Barry

Stuart.Marks@Eng.Sun.COM (Stuart Marks) (05/09/91)

    I have the following as one line of many within my $HOME/.openwin-menu
    file:

        "Saber-C"                   xsaber &

    I have tried just xsaber, exec xsaber, and the above.  In
    each case, I see the outline of the primary window, but before
    any text appears, the windows go away.

I'm not totally sure what's going wrong, but I believe this problem occurs
because olwm puts its child processes into a different process group
before exec'ing the program.  Olwm does *not* divorce the program from its
controlling terminal, though.  This is a rather odd situation, and perhaps
this is the cause of saber's trouble.

I do have a workaround, however.  Try running saber with its stdin
redirected from the console, e.g.

	"Saber-C"		    xsaber < /dev/console

This seems to make the problem go away.

From looking at trace output, it appears that saber is doing an
ioctl(0, TCGETA), which is failing with EINVAL.  (1) I'm not sure why it's
failing.  (2) I don't know why saber exits when this fails.

This is easy to reproduce by closing stdin before running saber, e.g.
"saber <&-" in sh/ksh.  Saber appears to exit silently (with exit code 0!)
when this happens.  Perhaps someone from Saber can respond to this
off-line.

    How can one start programs so that stderr type messages
    appear SOMEWHERE?  And of course, how do we find that somewhere :-) .

Programs exec'ed from olwm inherit olwm's stdin, stdout, and stderr.  Olwm
is typically started from the console, along with the rest of the system,
so stderr messages will go to the console terminal.

s'marks

Stuart W. Marks			ARPA: smarks@eng.sun.com
Windows & Graphics Software	UUCP: sun!smarks
Sun Microsystems, Inc.

lwv27@CAS.BITNET (Larry W. Virden ext. 2487) (05/10/91)

it appears that a solution for the Saber problem is to use:

    "Saber-C"                   xsaber < /dev/console

as my start up entry.  The other method - of using xterm -e xsaber -
should in theory also work.

--
Larry W. Virden                 UUCP: osu-cis!chemabs!lwv27
Same Mbox: BITNET: lwv27@cas    INET: lwv27%cas.BITNET@CUNYVM.CUNY.Edu
Personal: 674 Falls Place,   Reynoldsburg,OH 43068-1614
America Online: lvirden

openlook-request@openlook (05/12/91)

I had a similar problem with dbxtool, so I have the following :
	xterm -iconic -e dbxtool
which dbxtool a ptty to play with, and only slightly clutters my screen.

The problem seems to be that saber and dbx do tty specific ioctls on
stdin and give up if that fails.

Tim.

bill@polygen.uucp (Bill Poitras) (05/13/91)

In article <9105070650.AA2220@cas.org> lwv27@CAS.BITNET (Larry W. Virden ext. 2487) writes:
>Hello!
>
>        I have a specific problem which I believe is an example of
>a general condition.  I am using SunOS 4.1.1 and the OW that comes
>with that distribution.  I am using Saber-C - Version 3.0.1 .
>
>        I have the following as one line of many within my
>$HOME/.openwin-menu file:
>
>    "Saber-C"                   xsaber &
>
Read the release notes.  According to the release notes, Saber-C 3.0.1
cannot be started from a menu.  You must start it from the command line.
Sorry, but thats the facts.  Other than that, Saber-C 3.0.1 is the
greatest.

+-----------------+---------------------------+-----------------------------+
| Bill Poitras    | Polygen Corporation       | {princeton mit-eddie        |
|     (bill)      | Waltham, MA USA           |  bu sunne}!polygen!bill     |
|                 | FAX (617)890-8694         | bill@polygen.com            |
+-----------------+---------------------------+-----------------------------+

rhaar@albert.cs.gmr.com (Robert L. Haar CS50) (05/14/91)

In article <1085@redford.UUCP>, bill@polygen.uucp (Bill Poitras) writes:
|> In article <9105070650.AA2220@cas.org> lwv27@CAS.BITNET (Larry W.
Virden ext. 2487) writes:
|> >Hello!
|> >
|> >        I have a specific problem which I believe is an example of
|> >a general condition.  I am using SunOS 4.1.1 and the OW that comes
|> >with that distribution.  I am using Saber-C - Version 3.0.1 .
|> >
|> >        I have the following as one line of many within my
|> >$HOME/.openwin-menu file:
|> >
|> >    "Saber-C"                   xsaber &
|> >
|> Read the release notes.  According to the release notes, Saber-C 3.0.1
|> cannot be started from a menu.  You must start it from the command line.
|> Sorry, but thats the facts.  Other than that, Saber-C 3.0.1 is the
|> greatest.

I don't know about Saber-C 3.0.1, but I run Saber-C++ 1.0.1B sunig
the following line in my .openwin-menu file:

  "saberc++"              exec /usr/local/bin/xsaberc++ < /dev/console

The only problem is that Saber comes up looking at my home
directory.


	Bob Haar  InterNet : rhaar@gmr.com 
	Computer Science Dept., G.M. Research Laboratories
DISCLAIMER: Unless indicated otherwise, everything in this note is
personal opinion, not an official statement of General Motors Corp.