Bug 269188 - sysutils/lxterminal: vim garbled on launch
Summary: sysutils/lxterminal: vim garbled on launch
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-27 16:05 UTC by khwerz
Modified: 2024-03-11 04:23 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (portmaster)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description khwerz 2023-01-27 16:05:19 UTC
Whenever you open vim in lxterminal, the character [?4mn appears. Clearing the screen is necessary to get rid of it.

This is the default behavior, there is no .vimrc

## Installer
pkg

## OS
FreeBSD 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64

## Version
vim-9.0.0981

pkg -vv | grep -e url -e enabled -e priority
    url             : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly",
    enabled         : yes,
    priority        : 0,
Comment 1 Chris Hutchinson 2023-02-14 21:31:27 UTC
(In reply to khwerz from comment #0)
Hello.
What makes you sure it's not vim(1) and that
the same wouldn't happen an any of the other terminal(s)?

IOW I don't experience this on any of my boxes using
vim(1).

I can't help but wonder if this isn't environmental;
login(1) login.conf(5), etc... Things that affect
your console, such as lang being ASCII | UTF-8 etc.

Need more info

--Chris
Comment 2 khwerz 2023-02-15 02:04:45 UTC
(In reply to Chris Hutchinson from comment #1)

Because I've tested a lot of other terminals:
	uxterm, rxvt-unicode, xterm, qterminal, st, xfce4-terminal 

I am not sure of anything, vim works on all the other terminals fine.
So my hunch is the bug must be on lxterminal, or perhaps I need to run
the proper session manager? But I've run lxterminal in i3 and had no
problems (at least on raspbian). it also seems
to turn on syntax highlighting on a normal text file.

The login.conf has not been modified since installation

this is ~/.login_conf

> # $FreeBSD$
> #
> # see login.conf(5)
> #
> #me:\
> #	:charset=iso-8859-1:\
> #	:lang=de_DE.ISO8859-1:  

; env | sed -E s/$USER/'$USER/g' | Tinsert '> ' | xsel -i
> SHELL=/bin/sh
> PLAN9=/usr/local/plan9
> WINDOWID=10485763
> SHELLINIT=1
> TERM_PROGRAM_VERSION=3.3a
> TMUX=/tmp/tmux-1001/default,1249,0
> XDG_CONFIG_HOME=/home/$USER/.config
> EDITOR=editor
> ENV=/home/$USER/Config/$HOST/Sh/rc.sh
> PWD=/usr/home/$USER
> LOGNAME=$USER
> XAUTHORITY=/home/$USER/.Xauthority
> WINDOWPATH=9
> HOME=/home/$USER
> LANG=en_US.UTF-8
> TMPDIR=/tmp
> TERM=tmux-256color
> HOST=$HOST
> USER=$USER
> TMUX_PANE=%21
> ARCH=amd64
> VISUAL=visual
> DISPLAY=:0
> SHLVL=1
> PAGER=pager
> LC_MESSAGES=C
> MM_CHARSET=UTF-8
> XDG_RUNTIME_DIR=/tmp/run/user/$USER
> LC_TIME=en_US.UTF-8
> HOSTOS=FreeBSD
> GCC_COLORS=error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01
> BROWSER=browser
> PATH=/home/$USER/Run/Wrappers:/home/$USER/Run/Tmux:/home/$USER/Run/TUI:/home/$USER/Run/X11:/home/$USER/Run/CLI:/home/$USER/Run:/home/$USER/System/bin:/home/$USER/.luarocks/bin:/home/$USER/Run/OS/FreeBSD:/home/$USER/Run/Arch/amd64/FreeBSD:/home/$USER/Run/Arch/amd64:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/$USER/bin:/usr/local/plan9/bin
> BLOCKSIZE=K
> MAIL=/var/mail/$USER
> OLDPWD=/usr/home/$USER
> TERM_PROGRAM=tmux
> _=/usr/bin/env  

; vim --version
> VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jan 22 2023 13:16:48)
> Included patches: 1-981
> Compiled by root@131amd64-quarterly-job-02
> Huge version with GTK3 GUI.  Features included (+) or not (-):
> +acl               +file_in_path      +mouse_urxvt
> -tag_any_white +arabic            +find_in_path      +mouse_xterm
>   -tcl +autocmd           +float             +multi_byte
> +termguicolors +autochdir         +folding           +multi_lang
>   +terminal -autoservername    -footer            -mzscheme
> +terminfo +balloon_eval      +fork()            +netbeans_intg
> +termresponse +balloon_eval_term +gettext           +num64
>  +textobjects +browse            -hangul_input      +packages
>  +textprop ++builtin_terms    +iconv             +path_extra
> +timers +byte_offset       +insert_expand     -perl
> +title +channel           +ipv6              +persistent_undo
> +toolbar +cindent           +job               +popupwin
> +user_commands +clientserver      +jumplist          +postscript
>   +vartabs +clipboard         +keymap            +printer
> +vertsplit +cmdline_compl     +lambda            +profile
> +vim9script +cmdline_hist      +langmap           -python
> +viminfo +cmdline_info      +libcall           +python3
> +virtualedit +comments          +linebreak         +quickfix
> +visual +conceal           +lispindent        +reltime
> +visualextra +cryptv            +listcmds          +rightleft
> +vreplace +cscope            +localmap          -ruby
> +wildignore +cursorbind        -lua               +scrollbind
> +wildmenu +cursorshape       +menu              +signs
> +windows +dialog_con_gui    +mksession         +smartindent
> +writebackup +diff              +modify_fname      -sodium
> +X11 +digraphs          +mouse             -sound
> -xfontset +dnd               +mouseshape        +spell
> +xim -ebcdic            +mouse_dec         +startuptime       +xpm
> +emacs_tags        -mouse_gpm         +statusline
> +xsmp_interact +eval              -mouse_jsbterm     -sun_workshop
>   +xterm_clipboard +ex_extra          +mouse_netterm     +syntax
>       -xterm_save +extra_search      +mouse_sgr         +tag_binary
> -farsi             +mouse_sysmouse    -tag_old_static    
>    system vimrc file: "/usr/local/etc/vim/vimrc"
>      user vimrc file: "$HOME/.vimrc"
>  2nd user vimrc file: "~/.vim/vimrc"
>       user exrc file: "$HOME/.exrc"
>   system gvimrc file: "/usr/local/etc/vim/gvimrc"
>     user gvimrc file: "$HOME/.gvimrc"
> 2nd user gvimrc file: "~/.vim/gvimrc"
>        defaults file: "$VIMRUNTIME/defaults.vim"
>     system menu file: "$VIMRUNTIME/menu.vim"
>   fall-back for $VIM: "/usr/local/etc/vim"
>  f-b for $VIMRUNTIME: "/usr/local/share/vim/vim90"
> Compilation: cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0
> -I/usr/local/include -I/usr/local/include/glib-2.0
> -I/usr/local/lib/glib-2.0/include -I/usr/local/include/harfbuzz
> -I/usr/local/include/freetype2 -I/usr/local/include/libpng16
> -I/usr/local/include/fribidi -I/usr/local/include/cairo
> -I/usr/local/include/pixman-1 -I/usr/local/include/gdk-pixbuf-2.0
> -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/libepoll-shim
> -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0
> -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include
> -I/usr/local/include/at-spi-2.0 -D_THREAD_SAFE -pthread
> -DLIBICONV_PLUG -I/usr/local/include -O2 -pipe -DLIBICONV_PLUG
> -fstack-protector-strong -fno-strict-aliasing -D_REENTRANT
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/local/include Linking:
> cc -L/usr/local/lib -L/usr/local/lib -fstack-protector-strong
> -L/usr/local/lib -Wl,--as-needed -o vim -L/usr/local/lib -lgtk-3
> -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0
> -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0
> -lglib-2.0 -lintl -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm
> -lelf -pthread -lncursesw -lrt -lintl
> -L/usr/local/lib/python3.9/config-3.9 -lpython3.9 -lcrypt -lintl -ldl
> -L/usr/local/lib -lintl -lutil -lm -lm
Comment 3 Chris Hutchinson 2023-02-15 17:50:21 UTC
OK. On a laptop running:
FreeBSD fbsd13 13.1-STABLE FreeBSD 13.1-STABLE #0 stable/13-n252407-f42139db639: Fri Sep 16 02:35:00 UTC 2022 root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
pkg(8) added vim-tiny-9.0.1271
and
lxterminal-0.4.0
I can reproduce it.

Further; I've experimented with the various color "themes"
that lxterminal provides. The results are the same. It is
clear to me this is a character rendering problem. utf-8 vs
ASCII vs (???). In any case; either vim(1) is sending
something other terminals simply ignore, or that lxterminal
is MISinterpreting. In any case, now that I can reproduce it.
I'll be better able to investigate.
Comment 4 Luc 2023-02-19 18:28:23 UTC
I came here to complain about the same thing. Also lxterminal. No problem in xterm or sakura.
Comment 5 Chris Hutchinson 2024-03-11 04:23:43 UTC
OK. I've investigated this about as far as I can, without
becoming an lxterminal developer. I've also not found any
similar complaints listed among the issues reported at
the developers site[1].
I'm not sure how to better take this forward, save reporting
the issue on their github site.

1. https://github.com/lxde/lxterminal/issues