mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
XQuartz: Force X11Controller to reset a broken DISPLAY envvar.
(cherry picked from commit f1a52b5b5ac31702497937efe3ac578be9a6c54f)
This commit is contained in:
parent
0b314c50a2
commit
94df1ab7f0
3 changed files with 20 additions and 3 deletions
|
|
@ -57,6 +57,8 @@ void DarwinListenOnOpenFD(int fd);
|
|||
|
||||
extern int noPanoramiXExtension;
|
||||
|
||||
extern int xquartz_resetenv_display;
|
||||
|
||||
#define DEFAULT_CLIENT "/usr/X11/bin/xterm"
|
||||
#define DEFAULT_STARTX "/usr/X11/bin/startx"
|
||||
#define DEFAULT_SHELL "/bin/sh"
|
||||
|
|
@ -408,6 +410,9 @@ int startup_trigger(int argc, char **argv, char **envp) {
|
|||
if((s = getenv("DISPLAY"))) {
|
||||
fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s);
|
||||
unsetenv("DISPLAY");
|
||||
|
||||
/* This tells X11Controller to not use the environment's DISPLAY and reset it based on the server's display */
|
||||
xquartz_resetenv_display = 1;
|
||||
} else {
|
||||
fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set). Starting X server.\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue