After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 548272 - [PATCH] Fix output of CSI 13,14, 18-21
[PATCH] Fix output of CSI 13,14, 18-21
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.17.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-18 13:15 UTC by Pedro Villavicencio
Modified: 2009-01-28 03:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
0001-tweak-CSI-13-14-18-19-20-21.patch (2.82 KB, patch)
2009-01-08 08:04 UTC, Saleem Abdulrasool
none Details | Review

Description Pedro Villavicencio 2008-08-18 13:15:43 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/vte/+bug/208837

"The escape sequence "Esc [ 1 8 t" is meant to make the terminal reply with the height and width of the current window characters. It's handled in vte-0.16.9/src/vteseq.c, line 3865. The output on gnome-terminal is different to the xterm from xterm-229-1.

Here's the correct, xterm, behaviour.

    $ echo -n '^[[18t'; sleep 1; echo
    ^[[8;24;80t
    $

And the gnome-terminal:

    $ echo -n '^[[18t' ; sleep 1; echo
    ^[[24;80t
    $

There should be an "8;" before the height of 24. This in theory allows the string to be echoed back to the terminal to restore this size in the future.

As well as xterm providing different behaviour, I've found various references on the Internet, e.g. http://invisible-island.net/xterm/ctlseqs/ctlseqs.html, which also suggest vte is wrong."

"The ^[ seen in the single quotes in my
examples is a literal escape character typed as `Ctrl-V Escape'. If
xterm is giving `^[[18t' back then that suggests a circumflex and open
bracket have been given. Try

    echo -n '@[18t' | tr @ \\033; sleep 1; echo

instead which can be cut-and-pasted. This uses tr(1) to turn the `@'
into an ASCII ESC."

Thanks,
Comment 1 Ralph Corderoy 2008-08-18 14:35:12 UTC
Ubuntu bug #208837 lists other problems in later comments;  I'd recommend referring to it.  In particular,

"There are other similar faults where the response is incorrect in that same function.

    ^[[13t response should be ^[[3;x;yt but is ^[[x;yt.
    ^[[14t response should be ^[[4;h;wt but is ^[[h;wt.
    ^[[19t response should be ^[[9;h;wt but is ^[[h;wt.

On a similar note, although ^[[20t is handled correctly in responding with the icon's label, the response to ^[[21t also outputs an `L' when it should be using a lowercase `l'. The above URL and xterm confirm lowercase `l' for 21 is the correct behaviour."
Comment 2 Saleem Abdulrasool 2009-01-08 08:04:20 UTC
Created attachment 126009 [details] [review]
0001-tweak-CSI-13-14-18-19-20-21.patch

Fixes the output for CSI 13, 14, 18, 19.  Changes the output of CSI 20, 21 to use the real terminal titles (and fixes the case issue).
Comment 3 Behdad Esfahbod 2009-01-08 22:16:05 UTC
ChPe, Chris, how does this look?
Comment 4 Christian Persch 2009-01-22 13:15:45 UTC
This looks ok to me, comparing with the control sequence reference link provided in comment 0.
Comment 5 Behdad Esfahbod 2009-01-28 03:33:15 UTC
Please commit if it compiles ;).
Comment 6 Saleem Abdulrasool 2009-01-28 03:48:01 UTC
Just compiled before checking in, just to be on the safe side :-).