diff options
author | Jeremy Huddleston <jeremy@tifa.local> | 2008-02-18 15:53:46 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremy@tifa.local> | 2008-02-18 15:53:46 -0800 |
commit | 916b1ab10d10efbdf3a544534acb95f9d28692cf (patch) | |
tree | 210610efc6c9128f1082a755237a10a5856f9b86 /startx.cpp | |
parent | 19fa8408a2c707081ba984537a3dcab744b0a565 (diff) |
Apple: font caching and defaults
Quieted defaults "error" messages by initializing default values
Do font caching in startx, so users with custom ~/.xinitrc won't have to
worry about updating it.
Add "cache_fonts" defaults item to toggle whether or not to cache fonts at startup
Fall back on fc-cache if font_cache.sh is not present.
Diffstat (limited to 'startx.cpp')
-rw-r--r-- | startx.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -79,7 +79,30 @@ clientargs="" serverargs="" #ifdef __APPLE__ -if [ x`defaults read org.x.X11 no_auth` = x0 ] || ! defaults read org.x.X11 no_auth ; then + +XCOMM Initialize defaults (this will cut down on "safe" error messages) +if ! defaults read org.x.X11 cache_fonts >& /dev/null ; then + defaults write org.x.X11 cache_fonts -bool true +fi + +if ! defaults read org.x.X11 no_auth >& /dev/null ; then + defaults write org.x.X11 no_auth -bool false +fi + +if ! defaults read org.x.X11 nolisten_tcp >& /dev/null ; then + defaults write org.x.X11 nolisten_tcp -bool true +fi + +XCOMM First, start caching fonts +if [ x`defaults read org.x.X11 cache_fonts` = x1 ] ; then + if [ -x /usr/X11/bin/font_cache.sh ] ; then + /usr/X11/bin/font_cache.sh & + elif [ -x /usr/X11/bin/fc-cache ] ; then + /usr/X11/bin/fc-cache & + fi +fi + +if [ x`defaults read org.x.X11 no_auth` = x0 ] ; then enable_xauth=1 else enable_xauth=0 |