[comp.windows.x] Help wanted with xterm

paul@lfcs.ed.ac.uk (Paul Anderson) (04/28/89)

Perhaps someone can help with two problems am I having with xterm ....

Running the version of xterm off the X11R3 tape on a pyramid 98XE (OS4.4)
works fine apart from the "su" command. If I type "su", the password prompt
is displayed, followed immediately by "Sorry" and an exit status of 2 from su -
it never gives me a chance to type the password. The same version of xterm
works fine on Ultrix and SunOS. (su works OK normally).

I also tried to run an xterm which allowed "sendEvents", so that I could
have another program which entered characters into the window. My program
to synthesize the events works fine for gnu and other X clients, but I
can't get it to work for xterm. Setting "*allowSendEvents: true" in the
database, or using -xrm doesn't seem to make any difference. Is there 
something else I should do?


Paul Anderson                      JANET: paul@uk.ac.ed.lfcs
LFCS, Dept. of Computer Science    UUCP:  ..!mcvax!ukc!lfcs!paul	
University of Edinburgh            ARPA:  paul%lfcs.ed.ac.uk@nsfnet-relay.ac.uk
Edinburgh EH9 3JZ, UK.             Tel:   031-667-1081 Ext 2788

jik@ATHENA.MIT.EDU (Jonathan I. Kamens) (04/30/89)

   Running the version of xterm off the X11R3 tape on a pyramid 98XE
   (OS4.4) works fine apart from the "su" command. If I type "su", the
   password prompt is displayed, followed immediately by "Sorry" and
   an exit status of 2 from su - it never gives me a chance to type
   the password. The same version of xterm works fine on Ultrix and
   SunOS. (su works OK normally).

This sounds like you are running an xterm that has not been made
setuid root.  If the xterm is not setuid root, then it cannot write an
entry into /etc/utmp for you when it grabs the tty.  I believe
(although I am not sure) that su requires that there be an entry for
your tty in /etc/utmp.

Jonathan Kamens			              USnail:
MIT Project Athena				410 Memorial Drive, No. 223F
jik@Athena.MIT.EDU				Cambridge, MA 02139-4318
Office: 617-253-4261			      Home: 617-225-8218

karenb@masscomp.UUCP (Karen ) (05/01/89)

Paul Anderson writes:

> works fine apart from the "su" command.  If I type "su", the password prompt
> is displayed, followed immediately by "Sorry" and an exit status of 2 from su

I've seen this happen when xterm doesn't have a controlling tty.  To see if
it does, type "echo hello > /dev/tty".  If you get an error like "No such 
device or address", that's your problem.  su requires a controlling tty.

In our case, the problem is a result of a bug in the OS.  A forked process 
doesn't always inherit its parent's tty.

--------------------------------------------------------------------------------
		     ___________
		    /  ________/__	...!{decvax,uunet}!masscomp!karenb
		   /__/_______/  /	karenb@westford.ccur.com
	  Concurrent /__________/
	Computer Corporation
--------------------------------------------------------------------------------

jim@EXPO.LCS.MIT.EDU (Jim Fulton) (05/01/89)

> I also tried to run an xterm which allowed "sendEvents", so that I could
> have another program which entered characters into the window. My program
> to synthesize the events works fine for gnu and other X clients, but I
> can't get it to work for xterm. Setting "*allowSendEvents: true" in the
> database, or using -xrm doesn't seem to make any difference. Is there
> something else I should do?

The R3 xterm had a bug in it that caused it to ignore the allowSendEvents.  If
you need this feature, you can add the appropriate line to charproc.c:

*** /tmp/,RCSt1a13851		Mon May  1 11:45:01 1989
--- clients/xterm/charproc.c	Mon May  1 11:45:17 1989
***************
*** 1920,1925 ****
--- 1920,1926 ----
     new->screen.always_highlight = request->screen.always_highlight;
     new->screen.pointer_cursor = request->screen.pointer_cursor;
     new->screen.eight_bits = request->screen.eight_bits;
+    new->screen.allowSendEvents = request->screen.allowSendEvents;
     new->misc.titeInhibit = request->misc.titeInhibit;