Well, this will stop it setting the title in xterm. I guess it is right and the intent here is to STOP it setting the title in the Linux console, even if the user turns it on.
On Tue, Jul 26, 2011 at 09:46:48AM +0200, David Coppa wrote: > On Tue, 26 Jul 2011, Nicholas Marriott wrote: > > > Yes it is trying to set the window title (three times in fact for some > > reason): > > > > ^[]0;Paolo Fresu & Uri Caine - Darn That Dream^G > > > > IIRC this will make wscons freeze. This is because it expects OSC to be > > terminated by ST (\033\) not by ^G (\007). So it sits waiting for the > > end that will never arrive. > > > > I can't try it right now but you will probably be able to see the same > > with eg: > > > > $ printf "\033]0;abc\007" > > > > If that does reproduce the behaviour then that's the problem. > > Well, there's a bug in ncmpcpp, into ncmpcpp-0.5.7/src/status.cpp: > > > #ifndef USE_PDCURSES > void WindowTitle(const std::string &status) > { > if (strcmp(getenv("TERM"), "linux") && Config.set_window_title) > std::cout << "\033]0;" << status << "\7"; > } > #endif // !USE_PDCURSES > > > Here's the diff. > Ok? > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/audio/ncmpcpp/Makefile,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 Makefile > --- Makefile 25 Jul 2011 20:08:23 -0000 1.1.1.1 > +++ Makefile 26 Jul 2011 07:45:09 -0000 > @@ -3,6 +3,7 @@ > COMMENT = ncurses mpd client inspired by ncmpc > > DISTNAME = ncmpcpp-0.5.7 > +REVISION = 0 > > EXTRACT_SUFX = .tar.bz2 > > Index: patches/patch-src_status_cpp > =================================================================== > RCS file: patches/patch-src_status_cpp > diff -N patches/patch-src_status_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-src_status_cpp 26 Jul 2011 07:45:09 -0000 > @@ -0,0 +1,12 @@ > +$OpenBSD$ > +--- src/status.cpp.orig Tue Jul 26 09:34:42 2011 > ++++ src/status.cpp Tue Jul 26 09:34:56 2011 > +@@ -66,7 +66,7 @@ namespace > + #ifndef USE_PDCURSES > + void WindowTitle(const std::string &status) > + { > +- if (strcmp(getenv("TERM"), "linux") && Config.set_window_title) > ++ if (!strcmp(getenv("TERM"), "linux") && Config.set_window_title) > + std::cout << "\033]0;" << status << "\7"; > + } > + #endif // !USE_PDCURSES