From: Kalle Wallin Date: Mon, 22 Mar 2004 12:33:26 +0000 (+0000) Subject: Only try to set the xterm title of DISPLAY is set. X-Git-Tag: v0.12_alpha1~682 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7e6b749897cff0bd98dddb314f0a9c6a60e87168;p=ncmpc.git Only try to set the xterm title of DISPLAY is set. git-svn-id: https://svn.musicpd.org/ncmpc/trunk@360 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/main.c b/main.c index 6247340..0a44051 100644 --- a/main.c +++ b/main.c @@ -85,7 +85,8 @@ main(int argc, char *argv[]) } /* set xterm title */ - printf("%c]0;%s%c", '\033', PACKAGE " v" VERSION, '\007'); + if( getenv("DISPLAY") ) + printf("%c]0;%s%c", '\033', PACKAGE " v" VERSION, '\007'); /* install exit function */ atexit(exit_and_cleanup);