[PATCH] Clean xterm title restore
Thomas Zajic
zlatko at gmx.at
Mon Jan 20 06:42:54 UTC 2003
* Adam Byrtek 'alpha' <alpha at student.uci.agh.edu.pl>, 20/01/2003, 02:48
> On Mon, Jan 20, 2003 at 01:05:51AM +0100, Thomas Zajic wrote:
>
> > Works fine here (finally no delays on startup :-), except one thing:
> > it fails to (save and?) restore the original xterm title on remote
> > connections when quitting mc.
>
> I don't have access to a remote xserver, so could you try to debug it?
Sorry, I should have been more clear - I wasn't talking about remote
_X_ connections (ie. via XDMCP or by setting $DISPLAY to a remote host),
but about running mc on a remote machine which I'm connected to via
telnet/ssh (ie. open an xterm on my workstation, telnet/ssh to the
remote machine, start mc on the remote machine).
> First of all you should check:
>
> - is the WINDOWID env variable set, try xprop -id $WINDOWID and check
> if it gives you info about your xterm (the title is in WM_NAME)
No, $WINDOWID is not set in the remote session. This is obviously only
part of the local shell's environment, and is not passed on to the shell
running on the remote machine after login.
However, if I start a new xterm from within the remote session (ie. open
an xterm on my workstation, telnet/ssh to the remote machine, open a new
xterm from there (which then pops up on my local X server), then run mc
in the newly created xterm), $WINDOWID is set (as a part of the remote
shell's environment), and setting/restoring the xterm title works as
expected.
Finally, if I telnet/ssh to the remote machine, and export $WINDOWID
manually before starting mc, then setting/restoring the xterm title
works fine as well.
There might be a better solution for this, but how about using your new
Xlib method if $WINDOWID is set, and using the old escape sequences
method as a fallback if it is not set?
> [...]
Thomas
--
=-------------------------------------------------------------------------=
- Thomas "ZlatkO" Zajic <zlatko at gmx.at> Linux-2.4.19 & Mutt-1.4i -
- "It is not easy to cut through a human head with a hacksaw." (M. C.) -
=-------------------------------------------------------------------------=
More information about the mc-devel
mailing list