[1659] in Athena Bugs

home help back first fref pref prev next nref lref last post

(RTPC) Version 6.0R: Xibm and xterm

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Sun Jan 15 21:34:09 1989

Date: Sun, 15 Jan 89 21:33:36 EST
From: Jonathan I. Kamens <jik@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
System type, version:	(RTPC) Version 6.0R
System name:		PIT-MANAGER
What's wrong:

In an attempt to customize my workstation I wrote the following short
program to replace the invocation of /etc/xterm in /etc/ttys:

#include <X11/Xlib.h>
#include <X11/cursorfont.h>

static char *argv[] = {
     "xterm", "-C", "-L", "-geometry", "80x76+0+0", "-display", ":0",
     "-bg", "violet", "-fg", "yellow", "-bw", "2", "-bd", "red", "-cr",
     "yellow", (char *) 0};
   
main()
{
     XColor green, violet, garbage;
     Display *display;
     Window root_w;
     Cursor root_c;

     display = XOpenDisplay(":0");
     root_w = RootWindow(display, 0);
     
     XAllocNamedColor(display, DefaultColormap(display, 0), "green",
		      &green, &garbage);
     XAllocNamedColor(display, DefaultColormap(display, 0), "violet",
		      &violet, &garbage);
     
     root_c = XCreateFontCursor(display, XC_X_cursor);

     XRecolorCursor(display, root_c, &green, &violet);

     XDefineCursor(display, root_w, root_c);

     XFlush(display);

     execv("/etc/xterm", argv);
}

The intent of this program, if you can't tell, is to change the color
of the X cursor from black and white to green and violet (no comments
on the color combination, please) and then to invoke a login xterm.

The program works perfectly when I use it only to change the cursor
color and do not put in the invocation of xterm.

However, when I put the line to execute it into /etc/ttys and try to
activate the X server, I get the error "xterm: cannot
open(/dev/tty-L)" and an error code of something like 31 with a minor
error code of 6 (I think those are the numbers -- I can't be more
specific because they scroll off the screen too quickly for me to read
them and remember them.).

Why does this happen?  Why is xterm trying to pen /dev/tty-L?

  --> Jonathan Kamens
      Project Athena Watchmaker
      SIPB (Student Information Processing Board) Member
      Volunteer OLC Consultant
      jik@ATHENA.MIT.EDU

home help back first fref pref prev next nref lref last post