View previous topic :: View next topic |
Author |
Message |
Phil H. Guest
|
Posted: Sat Dec 31, 2005 5:40 pm Post subject: Starting NeoOffice from shell |
|
Is there a way to start NeoOffice from a shell and pass startup switches?
This works in starting NeoOffice:
open -a "/applications/NeoOfficeJ.app"
but any switches included are treated like a file to open.
This sort of works:
"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile
but it starts soffice.bin instead of NeoOffice and doesn't return control to the shell until soffice has exited.
Thanks for any suggestions.
-Phil |
|
Back to top |
|
|
jjmckenzie51 The Anomaly
Joined: Apr 01, 2005 Posts: 1055 Location: Southeastern Arizona
|
Posted: Sat Dec 31, 2005 6:13 pm Post subject: Re: Starting NeoOffice from shell |
|
Phil H. wrote: | Is there a way to start NeoOffice from a shell and pass startup switches?
This works in starting NeoOffice:
open -a "/applications/NeoOfficeJ.app"
but any switches included are treated like a file to open.
This sort of works:
"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile
but it starts soffice.bin instead of NeoOffice and doesn't return control to the shell until soffice has exited. |
I don't know of any commands that will start the program but if you want to return control to the shell immediately after starting soffice.bin append an amperstand (&) to the end of your command. This will start soffice.bin as a background task.
James |
|
Back to top |
|
|
barefootguru Agent
Joined: Dec 28, 2005 Posts: 16 Location: Aotearoa New Zealand
|
Posted: Thu Jan 12, 2006 10:04 pm Post subject: Re: Starting NeoOffice from shell |
|
Phil H. wrote: | Is there a way to start NeoOffice from a shell and pass startup switches?
This works in starting NeoOffice:
open -a "/applications/NeoOfficeJ.app"
but any switches included are treated like a file to open.
This sort of works:
"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile
but it starts soffice.bin instead of NeoOffice and doesn't return control to the shell until soffice has exited.
|
First, the open can be shortened to 'open -a neooffice', but this isn't going to help, as there's no mention of passing switches on the open man page.
The second option sounds like you're on the right path to me (although I'm only just in my depth here). soffice.bin is what normally gets executed, the only difference should be the name in the Dock / Application Switcher (but you may end up with 2 copies of NO running if you then double-click on a doc).
Personally I'd look for a different solution--what does the switch do? |
|
Back to top |
|
|
OPENSTEP The One
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
|
Posted: Sat Jan 14, 2006 12:52 pm Post subject: Re: Starting NeoOffice from shell |
|
Phil H. wrote: |
"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile
|
First off, that is the correct way to go at it. soffice.bin is the actual guts of the application. The name may be off in the Dock, but that's dependent on the version of Mac OS X and whether it looks inside the bundle properly.
It won't exit until soffice.bin itself exits. Simple workaround...just background the process in your shell command
Code: |
/Applications/NeoOfficeJ.app/Contents/program/soffice.bin -n tempfile &
|
Note also that Neo (like OOo) is "smart" and won't launch more than one instance of itself. If you pass multiple requests via soffice.bin, the requests will all get handled by a single application instnce.
ed |
|
Back to top |
|
|
OPENSTEP The One
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
|
Posted: Sat Jan 14, 2006 12:53 pm Post subject: |
|
(note: the backgrounding is done by the trailing ampersand at the end of the command. You can background any commandline execution this way).
ed |
|
Back to top |
|
|
|