Ticket #29 (assigned enhancement)

Opened 16 years ago

Last modified 8 years ago

savannah: restoring xterm window title on exit wanted

Reported by: ossi Owned by:
Priority: trivial Milestone: Future Releases
Component: mc-core Version:
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by ossi) (diff)

Original: http://savannah.gnu.org/bugs/?13750

Submitted by:Oswald Buddenhagen <ossi>Submitted on:Tue 12 Jul 2005 09:26:47 AM UTC
Category:NoneSeverity:3 - Normal
Assigned to:NoneOpen/Closed:Open
Release:current (CVS or snapshot)Operating System:All

Original submission:

another one that has been discussed to death already ...

the first candidate for obtaining the xterm title is the xterm 
title query sequence. at startup the query command should be sent 
and things should continue as usual. the reply should be handled 
asynchronously as part of the normal input stream. that effectively 
means, that at the time the old title is received, a new one has 
been set already long ago - who cares? on the xterm side the 
processing is done in-order, so we'll always get the correct title. 
one remaining case is mc exiting before the report arrives, but 
anybody quitting mc after no more than 5 seconds should be shot 
anyway. :)

hoooow-ever ... the xterm title query sequence has been classified 
a first-class security hole of the calibre of ansi bombs, so many 
sites don't support it any more. so we need a plan b in case we 
don't get a reply to our query within a few (3-5?) seconds.
the answer is once again pretending to be an x application: 
connecting to $DISPLAY and asking the server for $WINDOWID's title.
note that this variant should be a fallback only: it is doomed to 
failure on remote machines if no (x forwarding)/(env var setup) is 
done. it's sorta unclean, too. 

Change History

comment:1 Changed 15 years ago by styx

  • Milestone set to 4.7

comment:2 Changed 15 years ago by angel_il

  • Status changed from new to closed
  • Resolution set to fixed

AFAIK in master this trouble solved

comment:3 Changed 15 years ago by ossi

  • Status changed from closed to reopened
  • Resolution fixed deleted

well, and i can say for a fact that it was not ...

comment:4 Changed 15 years ago by angel_il

  • severity set to no branch
  • Milestone changed from 4.7 to 4.7.0-pre3

comment:5 Changed 15 years ago by angel_il

  • Milestone changed from 4.7.0-pre3 to 4.7.0-pre4

comment:6 Changed 15 years ago by slavazanko

  • Status changed from reopened to accepted
  • Owner set to slavazanko
  • Cc ossi added

comment:7 Changed 15 years ago by slavazanko

  • Milestone changed from 4.7.0-pre4 to 4.7

comment:8 Changed 15 years ago by angel_il

ok. is guaranteed to receive a window title not really (IMHO). i try play with \033[21t\c, and if i have't Х then i get empty string as "window title".

anyway you can try set PS1 or PROMPT_COMMAND like this:
before start MC and have fun :)

comment:9 Changed 15 years ago by slavazanko

  • Owner changed from slavazanko to angel_il
  • Status changed from accepted to assigned

comment:10 Changed 15 years ago by angel_il

  • Milestone changed from 4.7 to Future Releases

comment:11 Changed 14 years ago by ossi

  • Cc ossi removed

comment:12 Changed 14 years ago by ossi

  • Cc ossi@… added

whoops ...

comment:13 Changed 11 years ago by ossi

  • Cc ossi@… removed
  • Description modified (diff)
  • Branch state set to no branch
  • Reporter changed from slavazanko to ossi

comment:14 Changed 8 years ago by andrew_b

  • Owner angel_il deleted
Note: See TracTickets for help on using tickets.