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 129940 - Editing any file in vi inside Terminal shows file contents as garbled
Editing any file in vi inside Terminal shows file contents as garbled
Status: RESOLVED DUPLICATE of bug 403130
Product: vte
Classification: Core
Component: general
0.10.x
Other other
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-12-24 10:28 UTC by Saurav
Modified: 2007-11-28 12:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Screenshot of a file opened in vi inside Terminal showing garbled output (174.61 KB, image/png)
2003-12-26 04:23 UTC, Saurav
Details
Screenshot of the same file opened in vi inside Terminal after CTRL-L is pressed (398.86 KB, image/png)
2003-12-26 04:25 UTC, Saurav
Details
my vt100 terminfo file (/usr/share/lib/terminfo/v/vt100) (1.33 KB, application/octet-stream)
2004-05-11 09:45 UTC, Saurav
Details

Description Saurav 2003-12-24 10:31:41 UTC
Distribution: Unknown
Package: gnome-terminal
Severity: major
Version: GNOME2.4.0 2.4.x
Gnome-Distributor: GARNOME
Synopsis: Editing any file in vi inside Terminal shows file contents as garbled
Bugzilla-Product: gnome-terminal
Bugzilla-Component: general
Bugzilla-Version: 2.4.x
Description:
Description of Problem:
If a file is edited in vi within Terminal, the file content is displayed
as
garbled(all control characters). Pressing CTRL-L clears the display.

Steps to reproduce the problem:
1. Start Terminal
2. Open a file in vi within Terminal
3. 

Actual Results:
The file content will be displayed as garbled. Even
if the file is empty, a non-printable character is displayed.

Expected Results:
The file should display its contents properly.

How often does this happen?
Everytime

Additional Information:




------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-12-24 05:31 -------

The original reporter (sauravs@cdotd.ernet.in) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.
Reassigning to the default owner of the component, gnome-terminal-maint@bugzilla.gnome.org.

Comment 1 Saurav 2003-12-26 04:23:39 UTC
Created attachment 22712 [details]
Screenshot of a file opened in vi inside Terminal showing garbled output
Comment 2 Saurav 2003-12-26 04:25:07 UTC
Created attachment 22713 [details]
Screenshot of the same file opened in vi inside Terminal after CTRL-L is pressed
Comment 3 Luis Villa 2003-12-30 02:24:43 UTC
Has this always been a problem or just with newer versions of vi
and/or gnome-terminal?
Comment 4 Saurav 2003-12-30 05:35:15 UTC
This is the 2nd time I have been able to compile gnome-terminal for
HP-UX. I noticed the problem even then. The vi used is actually vim
version 6.1. I use it regularly in gnome terminal 1.4.0.7 in GNOME 1.4
for HP-UX with no problem.
Comment 5 Mariano Suárez-Alvarez 2004-05-08 23:04:12 UTC
I use vim all the time and I have never seen anything like this.

This looks like vim is sending the control sequence 'ESC [ ? 2 5 I', which
gnome-terminal (nor the standard xterm, for that matter) recognizes.
Can you attach a copy of your xterm termcap?

Also, if you have the 'script' program installed: do the following in a
gnome-terminal:

       script gnome-terminal-problem
       vim empty-file
       (quit vim without doing anything)
       exit

That should leave a file named gnome-terminal-problem, which contains everything
vim sent to the terminal. If you can do that, please attach that file, too. 
Comment 6 Saurav 2004-05-11 09:43:43 UTC
Since it has been quite some time I posted my comment, I no longer have GNOME
installed in my system. So I can't provide the script output you mentioned. I have
attached the terminfo file for vt100 (my TERM is set to vt100). I think that's
what you are looking for
Comment 7 Saurav 2004-05-11 09:45:22 UTC
Created attachment 27588 [details]
my vt100 terminfo file (/usr/share/lib/terminfo/v/vt100)
Comment 8 Mariano Suárez-Alvarez 2004-06-05 06:45:48 UTC
That's a strange terminfo file for a vt100... it differs in 67 entries from mine.

In particular, it's 'civis' entry (cursor_invisible) is 'ESC [ ? 2 5 I', which
is the control sequence you are seeing, while the vt100 and pretty much every
other derivative term uses 'ESC [ ? 2 5 l' for that (all DEC reset control
sequences end in 'l'). 

As far as I can see (by running a tracing xterm) the only reason why using that
terminfo file does work on (xfree's, version 179) xterm is that those control
sequences are being ignored: this is an except from a trace of vim running with
your terminfo file:

parse 001B -> 5
parse 005B -> 53
parse 003F -> 18
parse 0032 -> 16
parse 0035 -> 16
parse 0049 -> 0

The 0 at the end essentially means the control sequence has been ignored.

Now I don't know if vte should be ignoring it as well... Nalin?
Comment 9 Kjartan Maraas 2005-08-29 11:51:28 UTC
Have you tried any later versions of VTE?
Comment 10 Behdad Esfahbod 2007-11-28 12:07:47 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 403130 ***