-
OOO: Possible fix for the command timed out error on Leopard
82 CommentsUPDATE: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.
82 Responses to “OOO: Possible fix for the command timed out error on Leopard”
-
maveric said on March 30th, 2008 at 11:37 pm
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.
-
The Major said on March 31st, 2008 at 5:54 pm
Worked for me, too. Thank you very much.
Peter
-
Allen & Liz said on March 31st, 2008 at 7:45 pm
Yep, this worked fine. Still don’t like the way OOo depends on X11 & doesn’t run stand alone.
-
Shaun McDonald said on March 31st, 2008 at 9:58 pm
Allen & Liz: You should try the test aqua version then.
-
Jeff said on April 1st, 2008 at 5:21 am
Excellent! Worked very well.
Thanks very much.
-Jeff -
s.engel said on April 1st, 2008 at 7:26 am
Thanks a lot. Your script solved this annoying problem for me.
-
Anonymous said on April 1st, 2008 at 8:43 pm
Perfect. Thanks
-
Anonymous said on April 2nd, 2008 at 9:43 pm
Worked fine for me, Thanks.
OSX 10.5.2, OO 2.4 -
Rooktoven said on April 3rd, 2008 at 3:24 pm
Worked for me as well. Thanks!
-
Anonymous said on April 5th, 2008 at 7:17 pm
Hmm the message went away but now OO won’t start. It appears to. X11 starts. then OO seems to close without anything happening.
-
Shaun McDonald said on April 5th, 2008 at 7:41 pm
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.
-
Anonymous said on April 7th, 2008 at 5:06 am
Perfect – worked for me. Thanks a lot.
OSX 10.5.2
OpenOffice 2.3 -
Matt said on April 7th, 2008 at 6:27 pm
Fabulous! Works for me on 2.4, thanks!
-
Fletch said on April 9th, 2008 at 5:15 pm
Worked perfectly for me on 10.5.2 with OO 2.4.0! Thanks Shaun!
-
LIN said on April 10th, 2008 at 12:44 pm
thanks dude, works like magic! 10.5.2 OO 2.4.0
-
Anonymous said on April 10th, 2008 at 2:57 pm
Script works great. Thanks very much for fixing this annoying problem. I’m running OO 2.3.1 with OS X 10.5.2.
-
Shaun McDonald said on April 10th, 2008 at 3:13 pm
anonymous: Do you know that OO 2.4.0 is available?
-
Anonymous said on April 13th, 2008 at 12:00 pm
Very impressive, works like a charm.
-
Csaba said on April 13th, 2008 at 7:37 pm
Worked perfectly. Thanks. Great Script!!!
-
Anonymous said on April 14th, 2008 at 10:02 pm
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!
-
BarneyHoe said on April 22nd, 2008 at 5:24 pm
Hi,
this works great! Than you very much for the excellent work
Rolf
-
Anonymous said on April 25th, 2008 at 2:29 pm
Thx:) everything works fine, no problems, no errors just pure pleasure
Lukasz
-
Anonymous said on April 26th, 2008 at 4:21 pm
Thanks Shaun….works very well with my Leopard install. Thanks – no more silly wait!
-
Tommyjb1 said on April 26th, 2008 at 11:10 pm
When I attempt to save the script, it says the “Document cannot be saved.”
-
Shaun McDonald said on April 26th, 2008 at 11:58 pm
Tommyjb1: Are you sure that you have write access to the OpenOffice.org 2.app?
-
Anonymous said on April 28th, 2008 at 2:15 pm
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.
-
Thomas said on April 29th, 2008 at 12:49 am
Shaun,
Yep, I have write permissions…nevertheless….
-
ptamaro said on April 29th, 2008 at 3:29 pm
This worked for me too Shaun, it was really easy… Thanks for the helpful post!
-
Sailorcurt said on April 29th, 2008 at 6:05 pm
As a brand new Mac user, I thank you sir. That was driving me nuts.
You’re my hero.
-
Anonymous said on April 29th, 2008 at 6:42 pm
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!
-
Anonymous said on May 2nd, 2008 at 2:11 am
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.
-
Doug said on May 3rd, 2008 at 12:59 pm
Your solution worked. Thanks!
-
Tim said on May 5th, 2008 at 3:51 am
Thanks man, worked nicely.
-
Bryan said on May 13th, 2008 at 12:20 am
Thanks. This worked! 10.5.2, X11 v2.2.1, OO 2.4. Makes me want to learn more about AppleScript.
-
Jeffrey said on May 13th, 2008 at 11:23 pm
Awesome, this worked for me too. Thanks much.
-
Anonymous said on May 14th, 2008 at 7:46 pm
It works for me too. Mac OSx 10.5.2, X11 v2.1.1, OO 2.3.1
-
NN said on May 19th, 2008 at 10:28 pm
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.
-
Anonymous said on May 20th, 2008 at 9:11 pm
Works like a charm. It even seems like OO is starting much quicker than before.
OSX 10.5.2
OOO 2.4 -
Brian said on May 22nd, 2008 at 3:30 am
Excellent solution. I too need to learn more Applescript.
Mac OS X 10.5.2
OO 2.4-Brian
-
Alana said on May 23rd, 2008 at 6:13 pm
Just what I needed. Mac OSx 10.5.2, X11 v2.1.1, OOO 2.4
-
Anonymous said on May 24th, 2008 at 4:36 pm
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
-
Anonymous said on May 24th, 2008 at 4:48 pm
Finally found the script editor and the file to edit — openOffice 2.4 opens smoothly now, thanks Shaun!
-
Anonymous said on May 27th, 2008 at 7:43 am
Shaun, thanks a lot. It did work perfectly for me. O
-
Anonymous said on June 1st, 2008 at 3:03 pm
Thank you for helping me to fix this problem.
-
Anonymous said on June 3rd, 2008 at 5:53 am
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.
-
NS said on June 4th, 2008 at 12:24 am
Very smooth, thanks. OS 10.5.3 with Xquartz 2.2.1. Looking forward to looking at the aqua you pointed out.
-
Jean said on June 4th, 2008 at 11:08 am
Perfect, thanks!
-
Woody UK said on June 8th, 2008 at 3:28 pm
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 -
Shaun McDonald said on June 8th, 2008 at 4:26 pm
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.
-
Anonymous said on June 11th, 2008 at 10:56 am
Thank you very much. It worked perfectly.
odg9 from Waterloo, Ontario, Canada
-
Evaporated said on June 16th, 2008 at 4:05 pm
Worked like a charm. Thanks.
-
Julián, Mexico City said on June 20th, 2008 at 4:07 pm
Worked fine on OS X 10.5.3, X11 2.2.2, OOO 2.4.
With a note: since my OS X is in Spanish, it didn’t work when I had OOO in English (in te xtem it complained about the locale). Once installed OOO in Spanish and modified the launcher, it worked at once.Thanks a lot!
-
Doug said on June 21st, 2008 at 8:07 am
Great stuff. Makes so much difference and makes OOo worthwhile using
Doug -
Laura said on June 22nd, 2008 at 4:13 pm
Hi Shaun,
I was excited when I saw your article, but unfortunately it didn’t work for me. This is a new mac mini (was still in its wrapper yesterday!), ‘About this mac’ tells me that its MAC OSX version 10.5.3, it really has nothing on it but what was already installed. I downloaded ‘OOo_2.4.0_MacOSXIntel_install_en-US.dmg’ from http://download.openoffice.org/other.html after the normal download page bounced to it.
I copied it into the applications folder and after asking me if I wanted to use the default fonts it kind of stalled, eventually giving me the timeout message, but in fact would not quit unless I used ‘Force Quit’. I found and applied the solution here which didn’t work (force quit and restart). Because I had used force quit, I actually trashed the application and copied it again from the dmg trying the solution once again (just start).
Looking online again I saw something about installing X11 or starting it first. X11 looks to be already installed as there is an icon for it in the utilities folder, I did try clicking it first, but to no effect.
One thing that seems strange to me, but may be fixed when/ if I finally get it to work is that the menu for open office when it sort of half starts gives me no options to start the office writer, the spreadsheet or in fact any of the applications.
Please tell me what you think.
Thanks a lot in advance for the help!Laura
-
Anonymous said on June 22nd, 2008 at 4:22 pm
Hi,
Super on OS X10.5.3
Thanks again
Tam -
Anonymous said on June 25th, 2008 at 1:24 am
Works for me on 10.5.3.
Thanks,
John -
Anonymous said on June 29th, 2008 at 8:30 pm
Many Many thanks, this bug had me briefly thinking about obtaining MS Office (Yeugh!. As a web-developer constantly having to create extra code for standards compliant code to work in IE I have a large dislike for microsoft!), worked like a charm on my 5 day old MacBook Pro with 10.5.3 on. You’ve saved me from polluting my lovely new mac.
-
Jeff said on July 2nd, 2008 at 7:52 pm
Nope, doesn’t work for me. I have tried everything and I still can’t get OO to work on this brand new macbook. Thinking of switching back to Ubuntu Linux. Mac is a lot of work to get anything unusual to work on it.
-
Vin Breau said on July 2nd, 2008 at 10:06 pm
Did not work for me at all. Now when I launch it I get a new error immediately:
“The application soffice.bin quit unexpectedly”
-
Anonymous said on July 5th, 2008 at 11:09 pm
thx dude
-
Anonymous said on July 7th, 2008 at 2:51 am
Thanks!!!
-
verszou said on July 7th, 2008 at 7:44 pm
Yay! Worked like a charm. Major annoyance gone
-
Tim said on July 10th, 2008 at 6:14 pm
Worked for me on OSX 10.5.4 with OO 2.4.1.
-
SaraQuigley said on July 11th, 2008 at 6:29 pm
Success!!! Thanks Shaun!
-
TTD said on July 14th, 2008 at 2:43 pm
Hi Shaun. I’m nearly there, but I too cannot save. When I get info on ‘OpenOffice.org’ it says (under sharing & permissions)…”You can only read”, while Name “RNW”(Me) as well as ‘staff’ have privilige ‘Read & Write”. I can’t unlock these settings and the ‘`ignore ownership on this volume’ is checked (and grey). Strange, for I am the administrator…. `any clue?
-
Anonymous said on July 18th, 2008 at 9:55 am
Thanks! This worked for me a couple months ago on OSX 10.5.4 and Oo 2.4, though after installing 2.4.1 I had to re-apply the fix. Any chance this fix could be incorporated into the next release?
-
Shaun McDonald said on July 18th, 2008 at 8:52 pm
As the next version will be an aqua version with 3.0, the change will not be required.
-
Anonymous said on July 19th, 2008 at 9:38 pm
Thank you SO MUCH! This is my first Mac and I’ still getting used to using it versus my old PC. I was really frusterated with this error message until I found and successfully used your fix! Thank you again!
-
tom Grassman said on July 26th, 2008 at 7:56 pm
Thank you Shaun!
I am a new apple user and not very knowledgeable about computers in general. Although I don’t have a clue about what a “splash” is and I didn’t recognize the evidence of a frozen OO (I just thought that the application wasn’t opening except on rare occasions which I couldn’t correlate with anything I was doing), I did get the time out message and thought I would try your fix before downloading OpenOffice.org 3. It seems to have worked splendidly!
Your instructions were sufficient for even my needs. I greatly appreciate the information you provided. Tom Grassman -
Anonymous said on August 3rd, 2008 at 12:15 am
thanks, but unfortunately, it’s still not working for me (i.e., command timed out). Any other suggestions? I have the latest version (10.5.4) and I checked my Activity Monitor and X11 is definitely installed and active, but when I open Open Office, it just hangs. Thanks in advance for any suggestions!
-
Anonymous said on August 3rd, 2008 at 8:02 pm
Disregard my previous comment. For some reason, today, one day later, it seems to be working. Thanks a lot for posting this solution!
-
David said on August 10th, 2008 at 12:26 pm
Thank you! Worked a charm for me. As a mac newbie it was also useful learning how to view the internal contents of an application (Applications, right click on OpenOffice, “show package contents” for anyone else who’s as clueless as me!)
MacBook 2.4 Duo, OSX Leopard, OO 2.4.1
-
sai said on September 11th, 2008 at 3:15 pm
glad i found this link …
iBook PPC-G4/1GHz 1.25GB RAM
MacOSX Leopard 10.5.3
XQuartz 2.2.2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
OO 2.4.0it absolutely works. Thanks a lot …
-
John Lang said on September 17th, 2008 at 6:21 am
Hi i found the script and pasted the following
*==== (global variables as get-functions) ====*)on getOOInstallPath()
return (((path to me) as string) & “Contents:”)
end getOOInstallPathon getOOResourcesPath()
return (((path to me) as string) & “Contents:Resources:”)
end getOOResourcesPathon getOOProgramPath()
return (getOOInstallPath() & “MacOS:”)
end getOOProgramPathon getScriptPath()
– set this to absolute path when debugging
return (((path to me) as string) & “Contents:Resources:Scripts:”)
end getScriptPathon getOOUserSettingsPath()
return (((path to home folder) as string) & “Library:Application Support:OpenOffice.org:2:”)
end getOOUserSettingsPathon getOOUserFontPath()
return (getOOUserSettingsPath() & “user:fonts:”)
end getOOUserFontPathon getUserLogsPath()
return (((path to home folder) as string) & “Library:Logs:”)
end getUserLogsPathon shellTerminator()
return (” &>/dev/null & echo $!”) as string
end shellTerminator–
– the default handlers: run, open, idle, quit
–on run
if (preRun()) then
logEvent(“(Scripts/main) Running OpenOffice.org”)
openSoffice(“-”)
end if
end runon open (theFiles)
if (preRun()) then
openFiles(theFiles)
end if
end openon idle
– close icon only if ooo has terminated
if (hasOOoQuit()) then
tell me to quit
end if
– check all x seconds if ok to quit
return 3
end idleon quit
if (hasOOoQuit()) then
continue quit
end if
end quit————————————————————-
on preRun()
– Check for the required version of Mac OS X
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
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– Check for that OOo can be found
if (not isRealPath(getOOProgramPath())) then
display dialog getMessage(“ERROR_OOO_NOT_FOUND”)
return false
end ifif (not isRealPath(getOOUserFontPath())) then
set createUserFont to “mkdir -p ” & (quoted form of POSIX path of getOOUserFontPath()) & “; ”
do shell script createUserFont
end if– If no crash occured before, ~/Library/Logs does not exist, and OpenOffice.org cannot be started
if (not isRealPath(getUserLogsPath())) then
set createUserLogsPath to “mkdir -p ” & (quoted form of POSIX path of getUserLogsPath()) & “; ”
do shell script createUserLogsPath
end ifthis did not fix it please send by email the complete script if posible
Cheers John Lang
-
John Lang said on September 18th, 2008 at 12:23 am
Hi I had a other go at it only to find that it would not save it so in short it is outside my capability a cut and past solution would be handy or a patch to fix it
as it stands today I can not work with open office all my files were created by open office before I upgraded to Leopard
Cheers John Lang Australia -
wohnungdonau said on September 28th, 2008 at 10:23 pm
Dear Shaun!
You saved my day with this script change! my wife was so angry about me (yeah, as if i did something to her pc…) it took me half a night to get to your blog, but now it works, so:
thank you very much!
yours,
rob from vienna (if you ever come here, write me an email)
-
Sharon said on October 2nd, 2008 at 4:22 am
I’m more of just an “end user” but I was able to follow your instructions. This, combined with reloading active X solved me problem of not being able to open Open Office after an upgrade from Mac. Thank you so much because I would have lost a lot of precious data because of course, I had not backed up in a month. Thank you!
-
Tomas said on October 12th, 2008 at 8:52 pm
Hallo,
i changed the script (/Applications/OpenOffice.org 2.4.app/Contents/Resources/Scripts/main.scpt) according instructions. Then i tried to start OpenOffice from Finder/Application folder. X11 and as well OpenOffice are displayed among running aplication. But OO menu consist just from 3 menues (OpenOffice.org, File,Edit) and exept Edit Script all submenues are dimmed and I cant open new document or create new.
Tomas
-
@Tomas, click the X11 icon, and it should activate the OpenOffice.org X11 window, thus allowing you to use the menus inside that window. With the X11 version you don’t use the menus in the Mac OS X menu bar like you do with other Mac apps. Instead you use the menus inside the application window.
Alternatively go to and use the Aqua version, which is more up to date, and more importantly is more Mac like.
-
Tomas said on October 13th, 2008 at 8:02 pm
Hi Shaun,
today it works fine. I simply did the same like tommorow many times ( close the X11 standardly, and Force Quit the OO). After new starting of OO it start to work with menu inside Application window.
Thanx and bye.
p.s. I am former windows c++ developer which decided switch to MAC for the rest of the life…
-
“Command Time Out Error” OpenOffice di MacOSX Leopard « c’est la vie said on October 25th, 2008 at 3:55 am
[...] google … dan nemu link ShaunMcDonald yang nulis solusi masalah ini … implemented and voila OpenOffice bisa jalan normal [...]
-
John Lang said on October 13th, 2009 at 2:02 am
HI IS THERE ANY ISSUES BETWEEN PARALLELS AND UPGRADE LEOPART SNOW

Recent Comments