What: Cause non-arbitrary commands on an hpterm by writing to the tty When: Discovered 7/15/96 Who: David Ljung Description: If someone is using an hpterm with a writable tty, then you can send Escape codes to that terminal to make it execute specific commands. If you send an Escape-a to an hpterm tty, then it will sometimes try to execute a command of the format xxxcyyyR (more on this later). Sometimes, however, it will hang the hpterm instead. I'm not sure what the dependency is for this. It doesn't seem to be OS revision, shell type or tty/pty type. This needs to be controllable or determinable at some point, obviously. All machines will hang on an Escape-c, and the machines that hang on Escape-a will also hang on Escape-d. The command executed is xxxcyyyR where xxx is the column and yyy is the row. The column is from the left side of the window, but the row is from the top of the 'virtual window' that the hpterm is in, not the actual window (so it includes scrollback regions). You can control this with the Escape-h command, which is home. The command: echo (escape)h(escape)a >> their_tty will execute the command at the home position, hence it will try to execute 000c000R. If we have access to their path we can put a command in the path called 000c000R that will be run as their user. Then when you do the Escape-h Escape-a combination, it will force their hpterm to send it to their shell as a command. Important note: If they aren't at a shell prompt then it will go to whatever application they are currently running. This also means that if they have a line partially typed into their shell then it will run the command appended to that line - probably not what you want. A solution to the second problem is to do an Escape-a sequence first, that will execute some garbage command and clear the buffer, then you can run the h,a combination to get what you want, as long as they are at a shell prompt. -------------------------------------------------- TO DO: Figure out the dependencies that cause some windows to take Escape-a as a command and some take it as a hang. More needs to be learned about the escape codes. It would be *extremely* nice if the command was arbitrary, so you didn't need to have access to executables in their path.