From 7e6b749897cff0bd98dddb314f0a9c6a60e87168 Mon Sep 17 00:00:00 2001 From: Kalle Wallin Date: Mon, 22 Mar 2004 12:33:26 +0000 Subject: [PATCH] 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 --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.30.2