Path: utzoo!attcan!telly!lethe!torsqnt!jarvis.csri.toronto.edu!mailrus!uwm.edu!bionet!ames!ncar!tank!eecae!abaa!itivax!umich!zip.eecs.umich.edu!martin From: martin@citi.umich.edu (Martin Friedmann) Newsgroups: comp.windows.x Subject: Re: XTerm Escape Sequences (X11 Version) Message-ID: Date: 18 Sep 89 17:20:27 GMT References: Sender: news@zippy.eecs.umich.edu Organization: University of Michigan/CITI Lines: 62 In-reply-to: montnaro@sprite.crd.ge.com's message of 12 Sep 89 17:44:43 GMT In article montnaro@sprite.crd.ge.com (Skip Montanaro) writes: > I rummaged around through the xterm code and came up with the following > stuff. No guarantees. Well so did I... I hacked in the following escape sequences for those who like to have secure keyboards when they type in their passwords... set secure keyboard ESC ] 3 NP (NP is a non printing character) unset secure keyboard ESC ] 4 NP *** misc.c.link Wed Jan 11 20:24:12 1989 --- misc.c Mon Sep 18 12:52:18 1989 *************** *** 724,729 **** --- 724,738 ---- Changetitle(buf); break; + case 3: /* set xterm secure mode */ + if (!screen->grabbedKbd) + xdomenufunc(0, CurrentTime); /* XXX constant zero! */ + break; + + case 4: + if (screen->grabbedKbd) + xdomenufunc(0, CurrentTime); /* XXX constant zero! */ + break; case 46: /* new log file */ if((cp = malloc((unsigned)strlen(buf) + 1)) == NULL) I haven't yet completed my rlogin and telnet aliases, but they may look like this... alias secure 'if ($term == xterm) echo -n "^[]3^G"' alias unsecure 'if ($term == xterm) echo -n "^[]4^G"' alias rlogin 'secure;\rlogin' alias telnet 'secure;\telnet' alias ftp 'secure;\ftp' Then... in your .login or .cshrc on the various hosts to which you login unsecure This way you need not fuss with the ctrl Button1 menu each time you type your password. Also system administrators and modify system, or network wide /bin/login programs and log scripts (klog) to provide these escape sequences for users in the default case. NOTE to the X Consortium: I didn't think too hard about *where* to put the new escape sequences. And wouldn't want these to stick, because they are surely not mapped in the *correct* spot in the escape code space, and because from looking at my modified code it isn't too cool having a 0 instead of the real #defined XMENU_GRABKBD. But I (and ?others?) would like to see this functionality in the R4 xterm, because it makes the (normal persons, not the consortiums) secure X environment much easier to use. -- Marty.