OOO: Possible fix for the command timed out error on Leopard
With a change in the way that X11 works on Leopard, the X11 version of OpenOffice.org has been giving an error message on startup saying "command timed out". With previous versions of Mac OS X, OpenOffice.org had to make sure that X11 was running first be trying to start OpenOffice.org.
on openSoffice(aFile)"...."end openSoffice" with the following:Please comment on how this works for you.
on openSoffice(aFile)
if (atLeastOSXVersion(10, 5, 0)) then
-- if we have leopard, we don't need to manually start the X server first
set theCmd to "sh " & (quoted form of (POSIX path of getOOProgramPath() & "soffice")) & " "
do shell script theCmd & aFile & shellTerminator()
else
set theDisplay to startXServer()
if (theDisplay is equal to "error") then
return
end if
set theEnv to "DISPLAY=" & theDisplay & " ; export DISPLAY; "
set theCmd to "sh " & (quoted form of (POSIX path of getOOProgramPath() & "soffice")) & " "
do shell script theEnv & theCmd & aFile & shellTerminator()
-- logEvent("open CMD: " & theEnv & theCmd & aFile)
end if
end openSoffice



