Subject: Re: xterm: Can't execvp screen; sleep 10: Permission denied
To: Pierre-Philipp Braun <ppwb@club-internet.fr>
From: Robert Elz <kre@munnari.OZ.AU>
List: netbsd-help
Date: 05/20/2003 10:53:04
    Date:        Tue, 20 May 2003 00:43:06 +0200 (CEST)
    From:        Pierre-Philipp Braun <ppwb@club-internet.fr>
    Message-ID:  <Pine.NEB.4.55.0305200020300.1284@unenff.flgrf.arg>

  | > xterm -e sh -c "screen ; sleep 10" ?
  | 
  | Then, during ten seconds, i get a blank xterm window without even a shell
  | prompt.

Given what you say below, that's to be expected.

  | 	- when i type 'screen' directly into an xterm, nothing happends, i get the
  | next prompt with no error msg.

This is the one to work on.   Forget all the other ways of invoking it
using xterms, they're ways that might be better for some uses, but they're
just extra complexity over this one.   As long as this doesn't work, none
of the others will either.   So, you need to find the problem with this one.

As one quick check, try

	screen 2>&1 | cat -uv

I'm not a screen user, but many curses based programs have a tendency to
write an error message into their window, then exit, clearing the screen,
and obliterating the error message, all so quickly that you can't even
really see it happen (talk can certainly do that for example).

The invocation above will cause all screen control attempted by screen to
simply be written as characters that you can see (^[ instead of "ESC"
for example), and screen has no way to clear the terminal - anything it
happens to write will remain visible (it will also be completely useless
if it does happen to work, rather than exit - so be prepared to kill it
from a different xterm).    It is possible that redirecting the output might
cause screen to complain (if it insists that stdout be a tty) but you
will have to try it to see (if it complains "not a tty" or similar, then
you have just learned nothing).

If that doesn't help, try
	ktrace screen
then when it exits,
	kdump

and see what happened - what files it was reading, not long before it
exits.

  | It could be a personnal mistake i did into some configuration, but i don't
  | see what other configurations than screenrc and $PATH could be related to
  | that matter.

TERM TERMCAP and TERMINFO could all also be related.

Try
	 env -i TERM=xterm /usr/pkg/bin/screen

and see what happens then.

kre