summaryrefslogtreecommitdiff
path: root/startx.cpp
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremy@tifa.local>2008-02-18 15:53:46 -0800
committerJeremy Huddleston <jeremy@tifa.local>2008-02-18 15:53:46 -0800
commit916b1ab10d10efbdf3a544534acb95f9d28692cf (patch)
tree210610efc6c9128f1082a755237a10a5856f9b86 /startx.cpp
parent19fa8408a2c707081ba984537a3dcab744b0a565 (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.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/startx.cpp b/startx.cpp
index bde93fb..c31fd7f 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -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