UPDATE:Thanks to Eric Bachard, a fix very similar to this will be appearing in OpenOffice.org 2.4.2 due to be released at the end of October 2008.
—
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.
The following change should work for 2.4, 2.3.1, 2.3, and possibly earlier versions. Open the file OpenOffice.org 2.4.app/Contents/Resources/Scripts/main.scpt in “Script Editor”. (You will need to control+click the application icon and choose “Show Package Contents”.)
Then replace the code block “
on openSoffice(aFile)
“….”end openSoffice
” with the following: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
Please comment on how this works for you.
Problem solved. Thank you Shaun. Would be nice if we can get it out with a possible 2.4.1.
Plus we should make it public and post it in forums and on (trouble shooting) websites plus our own homepage.
Worked for me, too. Thank you very much.
Peter
Yep, this worked fine. Still don’t like the way OOo depends on X11 & doesn’t run stand alone.
Allen & Liz: You should try the test aqua version then.
Excellent! Worked very well.
Thanks very much.
-Jeff
Thanks a lot. Your script solved this annoying problem for me.
Perfect. Thanks
Worked fine for me, Thanks.
OSX 10.5.2, OO 2.4
Worked for me as well. Thanks!
Hmm the message went away but now OO won’t start. It appears to. X11 starts. then OO seems to close without anything happening.
Can you start OpenOffice.org by running /Applications/OpenOffice.org\ 2.4.app/Contents/MacOS/soffice in the xterm or terminal?
If not try to remove the application preference and see if that works.
Perfect – worked for me. Thanks a lot.
OSX 10.5.2
OpenOffice 2.3
Fabulous! Works for me on 2.4, thanks!
Worked perfectly for me on 10.5.2 with OO 2.4.0! Thanks Shaun!
thanks dude, works like magic! 10.5.2 OO 2.4.0
Script works great. Thanks very much for fixing this annoying problem. I’m running OO 2.3.1 with OS X 10.5.2.
anonymous: Do you know that OO 2.4.0 is available?
Very impressive, works like a charm.
Worked perfectly. Thanks. Great Script!!!
Genius! Worked like a charm on 10.5.2 w/Ooo 2.4.0 intel. Also using X11 2201 update (XQuartz project) Thanks SO much!
Hi,
this works great! Than you very much for the excellent work
Rolf
Thx:) everything works fine, no problems, no errors just pure pleasure 🙂
Lukasz
Thanks Shaun….works very well with my Leopard install. Thanks – no more silly wait!
When I attempt to save the script, it says the “Document cannot be saved.”
Tommyjb1: Are you sure that you have write access to the OpenOffice.org 2.app?
This is great. Thanks. Being new to Mac it took me a while to figure just how to do it and that only root could edit the script file but I got there in the end and OpenOffice starts up soooooo much faster now.
Shaun,
Yep, I have write permissions…nevertheless….
This worked for me too Shaun, it was really easy… Thanks for the helpful post!
As a brand new Mac user, I thank you sir. That was driving me nuts.
You’re my hero.
Sweet, thanks. I have owned a mac for only a few weeks and this is all new to me. Still was easy to follow and make the changes!
So much better now!
I tried everything: go back to X11 1.1.2 on my Leopard or move forward to X11 2.2.1, then found this hint. Now it works.
Your solution worked. Thanks!
Thanks man, worked nicely.
Thanks. This worked! 10.5.2, X11 v2.2.1, OO 2.4. Makes me want to learn more about AppleScript.
Awesome, this worked for me too. Thanks much.
It works for me too. Mac OSx 10.5.2, X11 v2.1.1, OO 2.3.1
It worked perfectly on our MacBook running OS X 10.5.2 and OOO 2.4
It also fixed a problem we had on Logging Out from OOO (we had to Force-Quit the process).
Thanks a lot.
Works like a charm. It even seems like OO is starting much quicker than before.
OSX 10.5.2
OOO 2.4
Excellent solution. I too need to learn more Applescript.
Mac OS X 10.5.2
OO 2.4
-Brian
Just what I needed. Mac OSx 10.5.2, X11 v2.1.1, OOO 2.4
Could anyone please tell me where to find the file to edit? Also, why can’t I find anything called “script editor” or similar in my applications or utilities folder?
Thanks a lot.
Jesse
Finally found the script editor and the file to edit — openOffice 2.4 opens smoothly now, thanks Shaun!
Shaun, thanks a lot. It did work perfectly for me. O
Thank you for helping me to fix this problem.
Yes, thank you, it worked for me. Too bad I had to spend 30 minutes searching for your fix, rather than have them implement this themselves.
Very smooth, thanks. OS 10.5.3 with Xquartz 2.2.1. Looking forward to looking at the aqua you pointed out.
Perfect, thanks!
Did NOT work, I still get the error “Command Timed Out” and then OO just hangs.
I’ve read and tried all the work-arounds and none of them work including this one.
I was running OO2.2 on Tiger and it worked fine. I’ve upgraded to Leopard 10.5.3 and neither OO2.2 nor 2.4 will work on it!
I’ve got a Quad G5 PPC with 16GB Ram & 1TB & 250GB hard drives so there is no issues with performance.
Before I changed the file as you suggested I tried opening X11 1st, even that didn’t work. I didn’t even need to as when I try to start OO it always opened X11 even before I changed this text.
The only thing I can think of is when I installed Leopard, I copied all my Apps and their folders including Utilities folder with X11 in it, so is it a different version of X11 on Tiger than it is on Leopard and if yes, then I reckon I could have corrupted it.
Anyone know where I can d/l X11 for Leopard from?
I’m glad to hear this fix worked for some of you
Woody UK:
I have X11.app 2.2.0.1 – (xorg-server 1.3.0-apple5) on Leopard. (See About X11 in the X11 menu.) I’m using Mac OS X 10.5.3.
It appears that you have corrupted X11 after installing Leopard by copying all your apps over. I think you can do a custom install of Mac OS X Leopard with just installing X11. Then install the Mac OS X 10.5.3 Combo update.
I’d be surprised if you hadn’t corrupted any of your other Mac apps like Safari and Mail.
Thank you very much. It worked perfectly.
odg9 from Waterloo, Ontario, Canada