fully disable xterm title?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

fully disable xterm title?

bela.lubkin
Hi,

I want to fully disable vim's xterm title bar manipulation.  Web searches offer ten thousand advices on how to turn it *on*, but very little on turning it off.  sigh.

Using --

   $ script -c 'vim foobar' /tmp/junk

-- I can see that even with "set notitle" in my .vimrc, vim still sets the title to "foobar", then sets it back to the original string.  For instance, these strings appear in the output of `vim -u NONE foobar`, with "set notitle; set t_ts=" in .vimrc:

   \033]2;foobar (~) - VIM\007
   \033]1;foobar\007
   \033]2;old_title\007
   \033]1;old_title\007

None of the following attempts were sufficient to stop it from doing that:

   "set notitle" in .vimrc
   "set t_ts=" in .vimrc
   $ vim -u NONE
   $ vim --cmd "set notitle"
   $ vim -C     # not even 'compatible mode' does it

These DO prevent it, but have additional effects -- I don't want to totally disengage vim's X11 capabilities, only the title manipulation:

   $ vim -X
   $ DISPLAY= vim

I could create a special terminfo entry with no title manipulation facilities for vim's use only, but .... ughhhhh.

vim 7.4 "Included patches: 1-1689" "Extra patches: 8.0.0056", on Ubuntu 16.04.02 x86_64.  [Future patch 7.4.2264 says "Improve handling of the title.", but code does not look like it would affect my issue; did not try to build with it.]

Thanks,

>Bela<

PS: SOLVED!  But I think worth injecting where other people may eventually find it as a solution to the same or related issues.

I was being misled: the '\033]1' sequence has to do with the *icon* of an xterm (what the window manager would show if it were minimized).  I think in some cases I had gotten it down to only showing that sequence in the output; which means I had already fixed my problem, but followed a false indicator that it wasn't fixed.

After downloading the source, I noticed the Makefile creating something called "no_title.vim"; this included the command "set noicon".

Putting:

   set notitle noicon

into my .vimrc *is* sufficient to fully prevent title manipulations, including those icon manipulation sequences which I was falsely identifying (but which, truthfully, I also don't want).

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fully disable xterm title?

bela.lubkin
Additional observations which might be obvious to a Vim maintainer / packager, but came as news to me:

1. This (Vim's manipulation, via '\033]%d;%s\007' output sequences, of xterm title & icon title, unless the user has done 'set notitle' and/or 'set noicon') only happens with Vim binaries compiled with X11 support.  In Ubuntu & Debian packaging this means the packages 'vim-gtk', 'vim-gtk3', 'vim-gnome', and probably 'vim-athena'; but not 'vim-tiny', 'vim', nor 'vim-nox'.

2. It only happens when Vim is aware that it is running under X, and can contact the X server.  For instance, if $DISPLAY is unset or wrong; or if one is running `ssh` in the xterm without having arranged for X communication (by `ssh -X` or by setting DISPLAY=$HOST:$DISP in the environment, and arranging for xterm_host to accept X connections from ssh_target_host); then no title twiddling occurs.  (I didn't test whether `ssh -X` or DISPLAY=$HOST:$DISP were sufficient to enable it.)

#2 was somewhat surprising to me since the manipulations are done by ASCII output chars in-band to the normal terminal communications channel.  Why should X protocol be involved?  Approximately: Vim wants to read the terminal's current title so that it can change it back on exit.  Although there's an escape sequence for that, it can be used for malicious purposes and is often disabled at xterm build time.  X protocol is therefore the only reliable channel with which to *read* the current title.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...