Code

Only try to set the xterm title of DISPLAY is set.
authorKalle Wallin <kaw@linux.se>
Mon, 22 Mar 2004 12:33:26 +0000 (12:33 +0000)
committerKalle Wallin <kaw@linux.se>
Mon, 22 Mar 2004 12:33:26 +0000 (12:33 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@360 09075e82-0dd4-0310-85a5-a0d7c8717e4f

main.c

diff --git a/main.c b/main.c
index 624734004af1658e8292b93780b4564e7922a074..0a44051121436f42fab977011103f538cdb19730 100644 (file)
--- 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);