Summary: | The application XQuartz could not be opened. The error message keep popping up unless I logout or restart the machine. | ||
---|---|---|---|
Product: | XQuartz | Reporter: | Yunrong Zhu <zhupsu> |
Component: | New Bugs | Assignee: | Jeremy Huddleston Sequoia <jeremyhu> |
Status: | RESOLVED INVALID | QA Contact: | Jeremy Huddleston Sequoia <jeremyhu> |
Severity: | blocker | ||
Priority: | medium | ||
Version: | 2.7.8 (xserver-1.16.4) | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Mac OS X (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Yunrong Zhu
2016-01-05 18:04:05 UTC
As you stated, the issue is: Cannot move old log file "//Library/Logs/X11/org.macosforge.xquartz.log" to "//Library/Logs/X11/org.macosforge.xquartz.log.old" That log filename is created by: char *lf; char *home = getenv("HOME"); assert(home); assert(0 < asprintf(&lf, "%s/Library/Logs/X11", home)); /* Ignore errors. If EEXIST, we don't care. If anything else, * LogInit will handle it for us. */ (void)mkdir(lf, S_IRWXU | S_IRWXG | S_IRWXO); free(lf); assert(0 < asprintf(&lf, "%s/Library/Logs/X11/%s.log", home, bundle_id_prefix)); LogInit(lf, ".old"); --- This all indicates that getenv("HOME") is returning "/" and you don't have write access to /Library/Logs/X11. By setting your home directory to /, you created some nasty problems for yourself (not just for X11, but for your system in general). I suggest you reformat and don't do that again. Is it because of the bash file in my home directory? But I checked my .bashrc file -- I defined the HOME as HOME=`pwd` export HOME This should give my actual home directory which is "/Users/zhu", not "/". Yeah, don't do that. That's very very wrong. > This should give my actual home directory which is "/Users/zhu", not "/".
1) HOME is set for you BEFORE that init script is run. Don't change it.
2) You assume that `pwd` is always your home directory when the shell is created. That's not a true assumption.
That solves my problem! Thanks a lot! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.