1 --- gnuplot-4.0.0.orig/src/term.c
2 +++ gnuplot-4.0.0/src/term.c
11 + char *binname = "/gnuplot_x11";
15 + fullname = (char*)malloc(sizeof(X11_DRIVER_DIR) + sizeof(binname) + 1);
16 + strcat(fullname, X11_DRIVER_DIR);
17 + strcat(fullname, binname);
20 + if (stat(fullname, &buf)) {
27 + if (buf.st_mode && S_IXOTH)
35 * Routine to detect what terminal is being used (or do anything else
36 * that would be nice). One anticipated (or allowed for) side effect
37 @@ -1356,12 +1383,18 @@
38 env_term = getenv("TERM"); /* try $TERM */
39 if (term_name == (char *) NULL
40 && env_term != (char *) NULL && strcmp(env_term, "xterm") == 0)
43 display = getenv("DISPLAY");
44 if (term_name == (char *) NULL && display != (char *) NULL)
50 + /* if x11 was selected check for driver */
51 + if (term_name && (strcmp(term_name, "x11") == 0) && !x11driver_found() && isatty(fileno(stdin))) {
52 + printf("*** X11 output driver not found, switching to dumb terminal!\n");
53 + printf("*** If you want to use the X11 output, please install the ""gnuplot-x11"" package\n");