diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 0d2f9e2de..2e18a7427 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -589,6 +589,13 @@ void OsVendorFatalError( void ) void OsVendorInit(void) { if (serverGeneration == 1) { + char *lf; + char *home = getenv("HOME"); + assert(home); + assert(0 < asprintf(&lf, "%s/Library/Logs/X11.%s.log", home, bundle_id_prefix)); + LogInit(lf, ".old"); + free(lf); + DarwinPrintBanner(); #ifdef ENABLE_DEBUG_LOG { diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index 3ba5d82c8..507c6f7f6 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -73,6 +73,9 @@ extern int darwinDesiredDepth; extern int darwinMainScreenX; extern int darwinMainScreenY; +// bundle-main.c +extern char *bundle_id_prefix; + #define ENABLE_DEBUG_LOG 1 #ifdef ENABLE_DEBUG_LOG diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 29890215a..bde259e70 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -88,7 +88,7 @@ asm (".desc ___crashreporter_info__, 0x10"); static const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE; -static char *bundle_id_prefix = NULL; +char *bundle_id_prefix = NULL; static char *server_bootstrap_name = NULL; #define DEBUG 1