From 7d41013b0e295ec0444c2f9099679bb6018c812f Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 2 Jul 2008 16:36:24 -0700 Subject: Apple: Using eval to protect people who have spaces in their home path. --- startx.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/startx.cpp b/startx.cpp index 8950feb..5ff62a0 100644 --- a/startx.cpp +++ b/startx.cpp @@ -271,7 +271,11 @@ if [ x"$enable_xauth" = x1 ] ; then xauth -q -f "$xserverauthfile" << EOF add :$dummy . $mcookie EOF +#ifdef __APPLE__ + serverargs=${serverargs}" -auth '"${xserverauthfile}"'" +#else serverargs=${serverargs}" -auth "${xserverauthfile} +#endif XCOMM now add the same credentials to the client authority file XCOMM if '$displayname' already exists do not overwrite it as another @@ -300,9 +304,15 @@ else XINIT "$client" $clientargs -- "$server" $display $serverargs fi #else + +#ifdef __APPLE__ +eval XINIT \"$client\" $clientargs -- \"$server\" $display $serverargs +#else XINIT "$client" $clientargs -- "$server" $display $serverargs #endif +#endif + if [ x"$enable_xauth" = x1 ] ; then if [ x"$removelist" != x ]; then XAUTH remove $removelist -- cgit v1.2.3