Есть ли способ эмулировать vt52 или любой другой тип терминала в Linux, как xterm?

736
AbbasFaisal

Я просто спрашиваю (для любопытства), существуют ли в linux / ubuntu другие эмуляторы терминала, которые понимают escape-последовательности для других типов терминалов (так же, как gnome-терминал для xterm), например vt52.

Я попытался установить $ TERM = vt52, но он сходит с ума, поэтому я не думаю, что gnome-терминал делает это.

0

2 ответа на вопрос

1
grawity

Xterm itself is a VTxxx emulator – the "xterm" protocol is a superset of VT102/VT220 in the first place, with some features from VT320/VT420/VT520, and of course some entirely new to Xterm itself. So you could set TERM=vt110 and the programs would work.

(Xterm also supports Tektronix 4014 emulation, but that's not really common.)

The VT52 protocol is a bit different, but even though GNOME Terminal (i.e. libvte) can't understand it, the real Xterm can. It should be enough to run xterm -ti vt52 to activate this.

URxvt (rxvt-unicode) should also support VT52, though I'm not sure how it's enabled (perhaps it's on by default); try urxvt -tn vt52.

I have tried both the xterm and urxvt as you said, both don't behave the way the should for the their respective escape sequences. For example, I printf the `clear` and `home` sequences using C programs (by looking at infocmp vt52) but they don't clear the screen or move the cursor to 0,0. AbbasFaisal 8 лет назад 0
Also tried TERM=vt110 but that doesn't seem to work as well. AbbasFaisal 8 лет назад 0
1
Sebastian R.

You need to tell your xterm to simulate a VT52, and you need to tell your environment that you run a VT52. So use xterm -ti vt52 -tn vt52. The first parameter sets up VT52 emulation, the second parameter sets up $TERM in the virtual environment (it is a virtual terminal, after all).

On my system, this is enough to make "clear" work in a VT52 emulation.

Похожие вопросы