tgl@g.gp.cs.cmu.edu (Tom Lane) (11/13/90)
I frequently use cu(1) as a means of dialing out from my s300 (HPUX 7.0) machine to a remote Unix system. If I invoke it inside an hpterm window I get a fairly decent simulation of an HP terminal. However, there are a couple of problems: 1. cu insists on swallowing any ^S or ^Q that I type. Since I use Emacs on the remote machine, this is a major drawback. 2. If a line arriving from the remote end starts with ~, the cu input process takes it as a command, which is never what I want. This usually results in cu becoming hung. Is there any way to "dumb down" cu so that it won't perform these operations? I still need it to recognize ~ commands that I type, but otherwise I would prefer it to be a noiseless filter... Alternately, is there some other program better adapted to serving as a terminal emulator? -- tom lane Internet: tgl@cs.cmu.edu UUCP: <your favorite internet/arpanet gateway>!cs.cmu.edu!tgl BITNET: tgl%cs.cmu.edu@cmuccvma CompuServe: >internet:tgl@cs.cmu.edu
alien@hpdmd48.boi.hp.com (Tom von Alten) (11/13/90)
> 1. cu insists on swallowing any ^S or ^Q that I type. This is a feature. :) Seriously though, it talks about this early on in the man page. ~%nostop will make it ignore DC1/DC3 control characters (i.e. ^S & ^Q). > 2. If a line arriving from the remote end starts with ~, the cu > input process takes it as a command, which is never what I want. > This usually results in cu becoming hung. Hmmm, this "shouldn't happen," since it's the transmit process that is supposed to react to ~'s. I never saw this particular problem, and I'm sure I must have used vi - which would really hose things if ~'s were bad. _____________ Tom von Alten email: alien@hpdmd48.boi.hp.com Hewlett-Packard Disk Mechanisms Division 208 323-2711____________________________ #include <std.disclaimer>
tgl@g.gp.cs.cmu.edu (Tom Lane) (11/14/90)
In article <15520020@hpdmd48.boi.hp.com>, alien@hpdmd48.boi.hp.com (Tom von Alten) responds to my earlier complaint: > > 1. cu insists on swallowing any ^S or ^Q that I type. > > ~%nostop > will make it ignore DC1/DC3 control characters (i.e. ^S & ^Q). That works, but there doesn't seem to be any way to invoke it automatically, i.e., without my having to type it by hand. I normally fire up cu from a small shell script, and I'd be happy if I could get the nostop mode set within the script. A command line switch would be nice... > > 2. If a line arriving from the remote end starts with ~, the cu > > input process takes it as a command, which is never what I want. > > This usually results in cu becoming hung. > > Hmmm, this "shouldn't happen," since it's the transmit > process that is supposed to react to ~'s. Sorry, I shoulda checked more carefully before posting. The receive process only responds to lines beginning "~>", which cause it to redirect incoming data to a file. (The man page implies that any line beginning with ~ is read as a command, but experimentation proves this false.) I've had this happen once or twice after mistakenly "cat"ing a binary file. Unless you are lucky enough to get another line starting with ~> from the remote end, you are pretty much stuck. (Well, you can say "echo '~>'" if you have the presence of mind to type it blind...) Not only is this a misfeature, it's a major security hole. People have built trojan-horse email and netnews posts with less. The fact that cu is setuid root doesn't make me feel any better about it, either. (Whyinhell does it have to be setuid root, anyway? And yes, I know that it downgrades itself after startup.) -- tom lane Internet: tgl@cs.cmu.edu UUCP: <your favorite internet/arpanet gateway>!cs.cmu.edu!tgl BITNET: tgl%cs.cmu.edu@cmuccvma CompuServe: >internet:tgl@cs.cmu.edu
rjn@hpfcso.HP.COM (Bob Niland) (11/14/90)
re: > The fact that cu is setuid root doesn't make me feel any better > about it, either. (Whyinhell does it have to be setuid root, anyway? > And yes, I know that it downgrades itself after startup.) Probably because it changes the ownership and permissions on the outbound /dev/tty or /dev/cul file being used. Looking an another window, I see that the file I'm using right now (from home), is... crw------- 1 rjn other 1 0x0d0001 Nov 14 08:12 /dev/culd0 Regards, Hewlett-Packard Bob Niland Internet: rjn@hpfcrjn.FC.HP.COM 3404 East Harmony Road UUCP: [hplabs|hpfcse]!hpfcrjn!rjn Ft Collins CO 80525-9599
alien@hpdmd48.boi.hp.com (Tom von Alten) (11/15/90)
I re-read the man page, and, sure enough, both transmit and receive processes repsond to ~. Receive only has one option, and that's the redirect to a file. I have to agree that the %nostop should have a command line option. Looks like maybe the ~ character should be resettable, too (or have a 'disable'). I have no idea how things like this could actually happen. :) The man page says it was done by HP & AT&T, but you'd probably need a person to really make it happen.