Re: xterm_title patch 898
- From: Tomas Styblo <tripie cpan org>
- To: mc-devel gnome org
- Subject: Re: xterm_title patch 898
- Date: Tue, 14 Jan 2003 13:09:52 +0100
* Adam Byrtek 'alpha' <alpha student uci agh edu pl> [Sun, 12 Jan 2003]:
> On Sun, Jan 05, 2003 at 05:39:54AM +0100, Tomas Styblo wrote:
> > In my humble opinion the restore does not work over network
> > because the implementation is fundamentally broken.
> Yes, I fully agree. It was just a dirty hack to start with. I was
> thinking about this issue during Christmas vacation and I see no easy
> way to implement this in a clean and compatibile way.
> First of all we have to choose between blocking and non-blocking
> behaviour to read old xterm title. Blocking is bad - if one's xterm is
> broken and didn't respond, user can wait forever, which is
> unacceptable. Non-blocking is also bad - we have to set some arbitrary
> timeout to wait for response on slow links, but it is unacceptable to
> force user with broken xterm wait 5 seconds. And if the response
> arrives after the timeout, it clutters the screen.
> And no, TERM env variable IMO is not a reliable way to detect xterm
> I see no good approach. I guess we could implement Tomas' patch as a
> additional option 'store/restore xterm title', which will be *turned
> off* by default. But I'm not sure if this feature is really so
> important. I personaly use shell to refresh title to cwd on every cd
> or execution.
My patch is bad. The delay seems to be unconditional on some
I checked how vim sets and restores the title.
It uses a completely different approach.
It looks at environment variables WINDOWID and DISPLAY and
connects to the X server using xlib. Then it gets and sets the
title using the xlib functions XGetWMName and XSetWMName.
It works very well in my experience. But it may not work
remotely, when X forwarding is not enabled in ssh configuration.
Maybe we should consider using this approach to restore the title ?
> Yes, I think your plan (XTERM_TITLE variable) is good. It would be
> very hard to convince people, but I think you should try.
I already have the library to implement it ready. It does not take
care of restoring the title, though. I already got patches for
some popular terminal applications to use the library to set a
title. If you are interested in it, please contact me privately.
Tomas Styblo <tripie cpan org>
] [Thread Prev