To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=91990
------- Additional comments from steffancl...@openoffice.org Wed May 20 13:35:36 +0000 2009 ------- In doing extensive testing, I have found that the build for MacOS X will not run headless in a truly headless environment. When launching OOo with the following command: /Applications/OpenOffice.org.app/Contents/MacOS/soffice -headless -nologo -nofirsstartwizard - accept="socket,host=127.0.0.1,port=8100;urp;" If a user is not logged in, the application will not work at all. This makes it impossible to use OOo in a headless environment. This is the error that is returned to the console when attempting to run OOo in a headless environment: _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. 2009-01-07 23:52:36.913 soffice.bin[58673:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x2748c80> '(null)') unlocked when not locked 2009-01-07 23:52:36.915 soffice.bin[58673:10b] *** Break on _NSLockError() to debug. 2009-01-07 23:52:36.928 soffice.bin[58673:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x2748c80> '(null)') unlocked when not locked 2009-01-07 23:52:36.928 soffice.bin[58673:10b] *** Break on _NSLockError() to debug. 2009-01-07 23:52:36.929 soffice.bin[58673:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x2748c80> '(null)') unlocked when not locked 2009-01-07 23:52:36.929 soffice.bin[58673:10b] *** Break on _NSLockError() to debug. 2009-01-07 23:52:36.929 soffice.bin[58673:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x2748c80> '(null)') unlocked when not locked 2009-01-07 23:52:36.929 soffice.bin[58673:10b] *** Break on _NSLockError() to debug. 2009-01-07 23:52:36.931 soffice.bin[58673:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x2748c80> '(null)') unlocked when not locked 2009-01-07 23:52:36.931 soffice.bin[58673:10b] *** Break on _NSLockError() to debug. 2009-01-07 23:52:37.458 soffice.bin[58673:10b] Error (1002) creating CGSWindow I found the following link on apple that explains the issue: http://developer.apple.com/technotes/tn2005/tn2083.html Is it likely this issue will be fixed in an upcoming release? Thanks, Steffan ------- Additional comments from of Wed Feb 11 07:20:18 +0000 2009 ------- @ sg: Please have a look. ------- Additional comments from steffancline Wed Feb 11 22:49:19 +0000 2009 ------- I posted the issue to the dawin user list on Apple and this is the response of someone on there. I hope it may help track down the issue. email #1 -------Steffan A. Cline <stef...@hldns.com> wrote: > I have been beating my head over using OpenOffice.org v3.0.1 in a headless > environment. The tool itself is *supposed* to work if launched with the > -headless environment. Hi, Steffan. I'm doing the same thing with OpenOffice, but my application is a bit easier, because I'm running underneath a background login app, so my OO always has access to the GUI context and window server. OO won't really run in the background, "-headless" or not, because it (a) registers itself as an app without having LSBackgroundOnly or LSUIElement set in its Info.plist, and (b) talks to the window server to do layout and rendering of pages. > This is the LaunchAgent script I used: > > [...] > > This launches OpenOffice just fine and resolves the issues. In my background > process I use OpenOffice for doing conversions. I have been instantiating > one instance of OpenOffice for each web site using this service. Each > instance will now start correctly on it's correct port BUT what I want to do > is to still have this work without the instance launched above in the > LaunchAgent plist file. Is there anyway to do this? It looks like you've already read http://developer.apple.com/technotes/tn2005/tn2083.html. But according to that, using your pre-login launch agent seems to be the way to go. So, no, I don't think there's a way to do that. Bill Email #2 ------- Steffan A. Cline <stef...@hldns.com> wrote: > The fact this is happening appears to be a bug in the build and I have > reported it as so. I hope to get an answer from the developer who is > responsible for the Mac build. For some reason, it is bound to the GUI which > should not even be launched when the -headless option is used. I am not sure > why they don't just use a separate binary to alleviate the issue. Well, it's a bug in the code. Using a separate binary wouldn't help, I think; it's the Info.plist of the app which controls this behavior. You could put LSBackgroundOnly in the Info.plist, then use TransformProcessType() internally in soffice to raise the "presence" of the app after parsing the command-line parameters, but they don't appear to do that. My guess is that whoever did the Mac port didn't think very hard about -headless, or possibly didn't understand this about Mac apps. Bill ------- Additional comments from steffancline Thu Feb 12 03:18:40 +0000 2009 ------- Here is another email from the same person although I have not yet tested what he has posted. Bill Janssen <jans...@parc.com> wrote: > Steffan A. Cline <stef...@hldns.com> wrote: > > > The fact this is happening appears to be a bug in the build and I have > > reported it as so. I hope to get an answer from the developer who is > > responsible for the Mac build. For some reason, it is bound to the GUI which > > should not even be launched when the -headless option is used. I am not sure > > why they don't just use a separate binary to alleviate the issue. > > Well, it's a bug in the code. Using a separate binary wouldn't help, I > think; it's the Info.plist of the app which controls this behavior. You > could put LSBackgroundOnly in the Info.plist, then use > TransformProcessType() internally in soffice to raise the "presence" of > the app after parsing the command-line parameters, but they don't appear > to do that. My guess is that whoever did the Mac port didn't think very > hard about -headless, or possibly didn't understand this about Mac apps. You can get rid of the Dock icon, though. 1. mkdir -p /usr/local/apps/BackgroundOpenOffice.app (or put this anywhere you have write permission) 2. /usr/X11/bin/lndir /Applications/OpenOffice.org.app /usr/local/apps/BackgroundOpenOffice.app 3. cd /usr/local/apps/BackgroundOpenOffice.app/Contents 4. mv Info.plist linkedInfo.plist 5. cp linkedInfo.plist Info.plist 6. chmod +w Info.plist 7. plutil -convert xml1 Info.plist 8. defaults write /usr/local/apps/BackgroundOpenOffice/Contents/Info LSUIElement -bool TRUE Now set up your LaunchAgent to use /usr/local/apps/BackgroundOpenOffice/Contents/MacOS/soffice instead of /Applications/OpenOffice.org.app/Contents/MacOS/soffice Enjoy! Bill ------- Additional comments from pl Fri Mar 13 14:47:58 +0000 2009 ------- The -headless switch will cause no window to be opened, but that does not make OOo run without an event loop and lots of other resources like an existing window server connection. Also the window server is probably not the only resource that is only available with a logged in user. To run without these resources would require a separate port; on the X11 platforms that is solved with the "svp" plugin. A similar approach might be feasible on Aqua, but lots of details would have to be checked. One of the problems e.g. would be fonts; do they depend on the window server ? Then there is clipboard support, which probably will not run flawless either, but has to be replaced by an "OOo internal only" implementation since lots of scripting relies on that. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@framework.openoffice.org For additional commands, e-mail: issues-h...@framework.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org