aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-03-22 12:33:26 +0000
committerKalle Wallin <kaw@linux.se>2004-03-22 12:33:26 +0000
commit7e6b749897cff0bd98dddb314f0a9c6a60e87168 (patch)
treec91f67e4db8381420667f565146d4b9a8f269c5d
parent5d3f55c855beed9b52fcc36da44e30c4c24c4a1b (diff)
downloadmpd-7e6b749897cff0bd98dddb314f0a9c6a60e87168.tar.gz
mpd-7e6b749897cff0bd98dddb314f0a9c6a60e87168.tar.xz
mpd-7e6b749897cff0bd98dddb314f0a9c6a60e87168.zip
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
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 624734004..0a4405112 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);