View previous topic :: View next topic |
Author |
Message |
eyeballkid Guest

|
Posted: Tue Jan 09, 2007 10:23 am Post subject: How to change the BundleExecutable? |
|
Hi,
I have a rather simple Problem, but can't get it solved:
I'd like NeoOffice to start with the "-nodefault" parameter, which means without an empty writer-document...
I thought this should be done, by changing the CFBundleExecutable in the Info.plist inside of the NO-Bundle, from: "soffice.bin" to "soffice.bin -nodefault", which i did. I did not work.
I then tried to change that to something different, but without an argument, let's say an executable called "test" which does nothing, to find if the parameter was the problem. Doubleclicking the Bundle-Icon did still run NO like it used to before.
That for I believe CFBundleExecutable does not hold the BundleExecutable, which is a little strange (as it says it does!?).
So my question would be: where is the name of the file stored which is run, when I doubleclick on the NO-Icon?
I just tried renaming "soffice.bin" to "soffice.bin.start" and create a shell-script by the name of "soffice.bin" which does run "soffice.bin.start -nodefault". This works partially: It starts NO without a template, but the Bar-Icon is that of a Shell-Script and is named "soffice.bin.start". Which would be acceptable (and repairable, by renaming the file to NeoOffice, changing the script and giving it the Ship-Icon), if I could drop Documents on it, like I can with the normally started NO, this indeed does not work...
Can anybody give me a hand? Easiest would be if someone could tell me where I have to change the BundleExecutable...
Thanks in advance!
ebk |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
|
Back to top |
|
 |
eyeballkid Guest

|
Posted: Tue Jan 09, 2007 10:40 am Post subject: |
|
Thanks! But:
...even if it would, it doesn't seem as if the file stored in CFBundleExecutable is executated!? (I replaced it with "test" and it still started NO...) |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Tue Jan 09, 2007 10:55 am Post subject: |
|
eyeballkid wrote: | Thanks! But:
...even if it would, it doesn't seem as if the file stored in CFBundleExecutable is executated!? (I replaced it with "test" and it still started NO...) |
The Mac OS X launch services daemon probably caches the Info.plist data so you will need to reboot to force Mac OS X to do a clean read of the Info.plist.
Patrick |
|
Back to top |
|
 |
eyeballkid Guest

|
Posted: Tue Jan 09, 2007 11:19 am Post subject: |
|
I tried rebooting (and used a cache-cleaner).
It doesn't seem to work either. It still starts NO, though "test" is in CFBundleExecutable... |
|
Back to top |
|
 |
yoxi Cipher

Joined: Sep 07, 2004 Posts: 1799 Location: Dawlish, Devon
|
Posted: Wed Jan 10, 2007 5:05 am Post subject: |
|
pluby wrote: | The Mac OS X launch services daemon probably caches the Info.plist data so you will need to reboot to force Mac OS X to do a clean read of the Info.plist. |
FYI, there's a shortcut to doing this without need for a restart, which is to move the app to another folder and then back again to where it was (while it's not running, of course) - this seems to force a reload of info.plist on launch, and it saves a lot of time when one is experimenting with .plist entries.
- padmavyuha |
|
Back to top |
|
 |
eyeballkid Guest

|
Posted: Wed Jan 10, 2007 7:56 am Post subject: |
|
yoxi wrote: |
FYI, there's a shortcut to doing this without need for a restart, which is to move the app to another folder and then back again to where it was (while it's not running, of course) - this seems to force a reload of info.plist on launch, and it saves a lot of time when one is experimenting with .plist entries.
- padmavyuha
|
Great! That does it...
Thank you alot!!!
For somebody might find it usefull, that's what I did:
I created a file called "soffice.bin-nodefault" (any name should work - it's just for me to remember what it's for) inside "/Applications/NeoOffice.app/Contents/MacOS" and put
Code: | #!/bin/sh
/Applications/NeoOffice.app/Contents/MacOS/soffice.bin -nodefault |
inside and made it executable.
Then I changed "CFBundleExecutable" inside "Info.plist" (located in "/Applications/NeoOffice.app/Contents/") from "soffice.bin" to "soffice.bin-nodefault".
I moved the NeoOffice-Bundle into a temporary Folder and then back to the Applications-Folder.
->Starts without writer-template!
IMHO this is really usefull for there are several other helpfull commandline-arguments. One might want to start NO with an empty calc-template etc... |
|
Back to top |
|
 |
OPENSTEP The One


Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
|
Posted: Wed Jan 10, 2007 9:47 am Post subject: |
|
The Launch Services database may also get stale as you remove around applications. You can find some tips for how to manually rebuild it here.
ed |
|
Back to top |
|
 |
sardisson Town Crier


Joined: Feb 01, 2004 Posts: 4588
|
Posted: Wed Jan 10, 2007 12:23 pm Post subject: |
|
We might want to wiki that tip. It's not an every-day request, but there have been enough requests for me to remember them....
Note that if any patch update updates Info.plist, it will break that change, of course
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
 |
sardisson Town Crier


Joined: Feb 01, 2004 Posts: 4588
|
Posted: Wed Jan 10, 2007 3:22 pm Post subject: |
|
I added a brief summary of this thread to the bottom of the existing Launch Shortcuts article.
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
 |
lt_brian_x Blue Pill

Joined: Mar 08, 2006 Posts: 1
|
Posted: Thu Dec 13, 2007 9:09 am Post subject: documents and templates |
|
Is it possible to launch into the "Templates and Documents" dialogue? It is in the NeoOffice>From Template... menu. It provides a nice starting interface for accessing any of the apps, templates, or docs.
I don't know if this is a good place for feature requests, but I think this would make a good default startup instead of launching into a text doc. Maybe a dialogue in preferences would allow choosing which app to start other than "Templates and Documents". However, "Templates and Documents" seems like a great default launch point.
That and why does the "My Documents" folder link to the user directory instead of the documents directory? This seems to be a point where OSX is in limbo between *nix and windows. What is the primary docs directory? Because OSX keeps music, pics, and vids outside of documents (unlike the windows "My Documents" folder), it would argue for the user directory. However, because applications drop so much crud in the OSX user directory (everything from printers to app config files), the user directory is too cluttered for my liking when I want to organize docs.
Sorry for the random post. I LOVE NeoOffice and appreciate all the work!
newb poster! |
|
Back to top |
|
 |
jochenf Blue Pill

Joined: Oct 03, 2008 Posts: 1
|
Posted: Fri Oct 03, 2008 6:10 am Post subject: |
|
The script shown above has 2 disadvantages:
1. It is not location independent, it assumes your NO is installed in /Applications.
2. It leaves a shell open while running NO
I would suggest the following script:
Code: | #!/bin/sh
cmd=`dirname "$0"`/soffice.bin
exec "$cmd" -nodefault "$@" |
The first line determines the location of the executable, the second line starts NO and terminates the shell. |
|
Back to top |
|
 |
sardisson Town Crier


Joined: Feb 01, 2004 Posts: 4588
|
Posted: Sat Oct 04, 2008 2:45 pm Post subject: |
|
jochenf wrote: | The script shown above has 2 disadvantages: |
I've added your commentary and improved script to the wiki.
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Sat Oct 04, 2008 3:04 pm Post subject: |
|
sardisson wrote: | jochenf wrote: | The script shown above has 2 disadvantages: |
I've added your commentary and improved script to the wiki. |
I forgot to add that jochenf's script is the same script that NeoOffice uses for its swriter, scalc, etc. scripts in the NeoOffice.app/Contents/MacOS folder so that script format has been very well tested.
Patrick |
|
Back to top |
|
 |
sardisson Town Crier


Joined: Feb 01, 2004 Posts: 4588
|
Posted: Sat Oct 04, 2008 4:38 pm Post subject: |
|
pluby wrote: | I forgot to add that jochenf's script is the same script that NeoOffice uses for its swriter, scalc, etc. scripts in the NeoOffice.app/Contents/MacOS folder so that script format has been very well tested.  |
In that case, I think I'll just remove the previous script from the wiki and encourage everyone to use only this format.
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
 |
|