Posted: Wed Apr 12, 2006 11:12 am Post subject: Neo startup by boot time program - needs a window?
We use open offfice as a converter from Microsoft Office documents to PDF on the Mac by having OO listen to a port (after starting it with the "-accept etc" string as documented.
This works fine if a user logs on and runs a shell script to start openoffice. However, we cannot get it to work within a startup item that starts at boot time. One issue seems to be running oo as root (which is what startup items run as). I have gotten around that by using a wrapper script that runs the oo script as a special user defined for the task. But, I then get the following error:
Apr 12 14:15:30 Hyacinthe soffice: kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only
Apr 12 14:15:38 Hyacinthe soffice: An unexpected Java error has been detected by HotSpot Virtual Machine:
Apr 12 14:15:38 Hyacinthe soffice: An error report file has been written to:
Apr 12 14:15:38 Hyacinthe soffice: /Users/neo/Library/Logs/Java/JavaNativeCrash_pid515.crash.log
Apr 12 14:15:38 Hyacinthe soffice: If this error is reproducible, please report it with the following information:
Apr 12 14:15:38 Hyacinthe soffice: 1. Provide the steps to reproduce, a test case, and any relevant information
Apr 12 14:15:38 Hyacinthe soffice: 2. The corresponding JavaNativeCrash_pid<num>.crash.log (Java state)
Apr 12 14:15:38 Hyacinthe soffice: 3. The corresponding <name>.crash.log (native state; generated by CrashReporter)
Apr 12 14:15:38 Hyacinthe soffice: File report at: http://bugreport.apple.com/
Apr 12 14:15:44 Hyacinthe crashdump[641]: soffice crashed
Apr 12 14:15:45 Hyacinthe crashdump[641]: crash report written to: /Users/neo/Library/Logs/CrashReporter/soffice.crash.log
this means, i think, that oo still needs to communicate with the windows system even though its invoked by:
Posted: Wed Apr 12, 2006 11:34 am Post subject: Re: Neo startup by boot time program - needs a window?
tigerSnark wrote:
We use open offfice as a converter from Microsoft Office documents to PDF on the Mac by having OO listen to a port (after starting it with the "-accept etc" string as documented.
This works fine if a user logs on and runs a shell script to start openoffice. However, we cannot get it to work within a startup item that starts at boot time. One issue seems to be running oo as root (which is what startup items run as). I have gotten around that by using a wrapper script that runs the oo script as a special user defined for the task. But, I then get the following error:
(error messages removed)
this means, i think, that oo still needs to communicate with the windows system even though its invoked by:
The problem stems from the fact that since our program starts up at boot time, it starts in a context that does not have access to the windows server.
So: 1. is there a way to run without a window context?
2. Can oo run as root on the mac?
Simple answers: OpenOffice.org needs to 'talk' to an X11 server even if it is invoked using the -invisible parameter. If you do not startup a X11 server before invoking soffice, you will get errors.
I think, for safety reasons, OpenOffice.org cannot be started as root. However, I will have to confirm this when I get back to my Mac.
Moving back to NeoOffice support as I was mistaken in moving it in the first place.
To answer your question, the problem is that you are trying to run a Mac app like it is an X11 app. Since NeoOffice is native, it uses the Mac window server APIs to do all drawing (and even if you are running OOo or Neo without a window, it still needs access to the Mac window server to do offscreen image drawing, font layout, etc.). In other words, both OOo and Neo are GUI apps and do not run headless. They may act as a server, but they still need a monitor.
Unlike X11, the Mac window server is very restrictive in which user can connect to it. Basically, only users with a logged in session can connect to the Mac window server. So, to do what you want to do, you are going to have to have your Mac be connected to a real or virtual monitor and log into a real user after booting. Then you should be able to run NeoOffice.
"We use open offfice as a converter from Microsoft Office documents to PDF on the Mac by having OO listen to a port (after starting it with the "-accept etc" string as documented. "
Uh, why go to all that trouble if Neo can read and write Word .docs?
Moving back to NeoOffice support as I was mistaken in moving it in the first place.
To answer your question, the problem is that you are trying to run a Mac app like it is an X11 app. Since NeoOffice is native, it uses the Mac window server APIs to do all drawing (and even if you are running OOo or Neo without a window, it still needs access to the Mac window server to do offscreen image drawing, font layout, etc.). In other words, both OOo and Neo are GUI apps and do not run headless. They may act as a server, but they still need a monitor.
Unlike X11, the Mac window server is very restrictive in which user can connect to it. Basically, only users with a logged in session can connect to the Mac window server. So, to do what you want to do, you are going to have to have your Mac be connected to a real or virtual monitor and log into a real user after booting. Then you should be able to run NeoOffice.
Patrick
Thanks for the explanation - at least it points me to a rationale for what I'm seeing and points to a solution path.
Unlike X11, the Mac window server is very restrictive in which user can connect to it. Basically, only users with a logged in session can connect to the Mac window server. So, to do what you want to do, you are going to have to have your Mac be connected to a real or virtual monitor and log into a real user after booting. Then you should be able to run NeoOffice.
Thanks for the explanation - at least it points me to a rationale for what I'm seeing and points to a solution path.
Well, I do not understand why soffice doesn't run as a server...
Since this thread ended in April, I understand you found a solution? It's solved in NeoOffice 2.x?
Well, I do not understand why soffice doesn't run as a server...
Since this thread ended in April, I understand you found a solution? It's solved in NeoOffice 2.x?
NeoOffice and its underlying OpenOffice.org need a window server to operate as both are GUI applications. If you run as server, you still need to have a window server that the application can talk to. This will not change as we have no plans to make NeoOffice run in "headless" mode.
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
Posted: Wed Sep 27, 2006 10:07 am Post subject:
No, there isn't actually any resolution to this. Neo is a client application only. It requires the ability to make a connection to WindowServer to run and isn't supported in "headless" mode. You must be logged into a Mac to use the software, and this will not be changed in Neo.
If you're trying to construct a server-based headless solution on a Mac, you'll need to run the X11 version. You can then redirect it to a different "virtual" X11 Server through solutions like VNC if it still requires a windowing system.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum