You are not logged in.
Hello all. First post in NC and have a little question:
When I run this in my xfce4-terminal:
echo -en '\eP'Um... It seems that the terminal emulator stucks and isn't usable any more. (Ctrl+C has no effect
)
It's really strange... then I use xterm to run it -- without any problems.
However I didn't give up (just because of curiosity
) then I tested more terminal emulators (gnome-terminal, pantheon-terminal, lxterminal and even the terminal plugin in geany), they stucks.
I dunno why 'echo' could stuck the terminal emulator (bug in these terminal emulators?...). Does anyone have idea about this?
Edit:
It seems that this is an issue of vte. And as I now use rxvt-unicode and yakuake, this issue could be avoided
.
See #3 for a temporary workaround.
Last edited by izmntuk (2014-10-24 06:08:38)
Offline
When the shell freezes after issuing this echo command, try hitting ESC a number of times (5 perhaps); it will return & ask you if you want all possible shell commands listed.
Option -e tells echo to interpret escape chatacters (such as \n, newline, \r, return, ... and yes, also \e). \e is the ESC (escape) character. echo does not seem to take it well if you put ESC before the end of the string argument (before the end of the string you want echo to print). It is basically the same if you interrupt a running echo command by hitting ESC manually.
Did you want echo to print exactly the string you gave it as an argument? In that case try to call echo without -e. Btw, there are a number of other commands that can lead to shell freezes and a still larger number that can lead to a lot more damage.
We are exactly the people our parents always warned us about.
Offline
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
ESC P Device Control String ( DCS is 0x90).
...
ESC \ String Terminator ( ST is 0x9c).
...
Device-Control functions
DCS P s ; P s | P t ST User-Defined Keys (DECUDK). Take a look at the Device-Control functions section of the page above.
The reason the terminal frozen is because the control sequence is not yet finished (in fact you only need echo -e '\eP' to "freeze" the terminal), and is waiting for ST to finish this control sequence.
So to finish the control sequence, hence unlock the terminal, you just need input the ST sequence which is '\e\' (type echo -e '\e\' blindly)
Last edited by lovetide (2014-06-18 17:46:17)
Hi, 你好
Offline