From ca9cb9750d2dd480240a37cdbd94fdba0a34da4c Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 2 Dec 2008 20:31:10 -0800 Subject: Apple: Honor X11_PREFS_DOMAIN if it's set (1.4.2-apple26 and later) --- startx.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'startx.cpp') diff --git a/startx.cpp b/startx.cpp index 5ff62a0..fb23f18 100644 --- a/startx.cpp +++ b/startx.cpp @@ -84,21 +84,25 @@ serverargs="" #ifdef __APPLE__ +if [ "x$X11_PREFS_DOMAIN" = x ] ; then + X11_PREFS_DOMAIN="org.x.X11" +fi + 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 +if ! defaults read $X11_PREFS_DOMAIN cache_fonts >& /dev/null ; then + defaults write $X11_PREFS_DOMAIN 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 +if ! defaults read $X11_PREFS_DOMAIN no_auth >& /dev/null ; then + defaults write $X11_PREFS_DOMAIN 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 +if ! defaults read $X11_PREFS_DOMAIN nolisten_tcp >& /dev/null ; then + defaults write $X11_PREFS_DOMAIN nolisten_tcp -bool true fi XCOMM First, start caching fonts -if [ x`defaults read org.x.X11 cache_fonts` = x1 ] ; then +if [ x`defaults read $X11_PREFS_DOMAIN cache_fonts` = x1 ] ; then if [ -x /usr/X11/bin/font_cache ] ; then /usr/X11/bin/font_cache & elif [ -x /usr/X11/bin/font_cache.sh ] ; then @@ -114,13 +118,13 @@ if [ -x XINITDIR/privileged_startx ] ; then XINITDIR/privileged_startx fi -if [ x`defaults read org.x.X11 no_auth` = x0 ] ; then +if [ x`defaults read $X11_PREFS_DOMAIN no_auth` = x0 ] ; then enable_xauth=1 else enable_xauth=0 fi -if [ x`defaults read org.x.X11 nolisten_tcp` = x1 ] ; then +if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then defaultserverargs="$defaultserverargs -nolisten tcp" fi -- cgit v1.2.1