NeoOffice Launch Shortcuts

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:37, 5 October 2008 (edit)
Sardisson (Talk | contribs)
(CFBundleExecutable - switch to use jochenf's script format only, since it matches the well-tested swriter, etc., ones that ship with NeoOffice)
← Previous diff
Revision as of 00:25, 10 August 2009 (edit) (undo)
Sardisson (Talk | contribs)
(this is usable now for Neo 2.2.5 p14 and 3.0 p6, but it still needs cleanup work)
Next diff →
Line 1: Line 1:
 +{{fixme}}
There are several methods which allow you to launch NeoOffice into a particular application rather than into Writer. There are several methods which allow you to launch NeoOffice into a particular application rather than into Writer.
-==Launch Shortcuts==+Beginning in [[NeoOffice_3.0_Patch_6_and_NeoOffice_2.2.5_Patch_14_New_Feature|NeoOffice 3.0 Patch-6 and NeoOffice 2.2.5 Patch-14]], NeoOffice supports a Mac OS X user default to specify the launch behavior (which module or files to open on launch). This is the preferred way to change NeoOffice's launch behavior. The default, however, remains opening a new blank Writer document.
 + 
 +==Modifying NeoOffice's Behavior with User Defaults==
 + 
 +Open the <code>/Applications/Utilities/Terminal</code> application, copy one of the following commands into the Terminal window, press {{key|Return}}, and then start NeoOffice.
 + 
 +* To start with NeoOffice with a Calc, Impress, Math/Formula, or Base document, use:
 +** Calc:<br/><pre>defaults write org.neooffice.NeoOffice DefaultLaunchOptions -calc</pre>
 +** Impress:<br/><pre>defaults write org.neooffice.NeoOffice DefaultLaunchOptions -impress</pre>
 +** Base:<br/><pre>defaults write org.neooffice.NeoOffice DefaultLaunchOptions -base</pre>
 +** Formula:<br/><pre>defaults write org.neooffice.NeoOffice DefaultLaunchOptions -math</pre>
 + 
 +* To start without any new document, use:<br/><pre>defaults write org.neooffice.NeoOffice DefaultLaunchOptions -nodefault</pre>
 +* If you want to specify more than one launch option, you can also specify a list of options; for example, NeoOffice will open '''file1.odt''' and '''file2.ods''' (located on your Desktop) when it launches:<br/><pre>defaults write org.neooffice.NeoOffice DefaultLaunchOptions -array ~/Desktop/file1.odt ~/Desktop/file2.ods</pre>
 + 
 +* To return to the default NeoOffice settings (opening a blank Writer document), use<br><pre>defaults delete org.neooffice.NeoOffice DefaultLaunchOptions</pre>
 + 
 +==Alternate Methods==
 + 
 +Depending on your particular needs, the following methods of launching NeoOffice into a particular module or opening a particular document may still be useful to you.
 + 
 +Note that it is also possible to make AppleScript-based "stub" applications for each NeoOffice module using the new DefaultLaunchOptions syntax, but no such applications have yet been written.
 + 
 +===Launch Shortcuts===
[[User:Jake|Jake]] made a template file for each of the components that make up NeoOffice and OpenOffice.org. By selecting the template, you'll launch NeoOffice into that component (provided NeoOffice is default application for those filetypes; if not, just [[Setting_the_Default_Application|make NeoOffice the default]] for each of these files). You can stick them in your Dock for one-click launching of the desired component. To take up less space on your Dock, put these templates in a folder, and place the folder on the Dock. Click and hold on the folder and you can choose the component you want. [[User:Jake|Jake]] made a template file for each of the components that make up NeoOffice and OpenOffice.org. By selecting the template, you'll launch NeoOffice into that component (provided NeoOffice is default application for those filetypes; if not, just [[Setting_the_Default_Application|make NeoOffice the default]] for each of these files). You can stick them in your Dock for one-click launching of the desired component. To take up less space on your Dock, put these templates in a folder, and place the folder on the Dock. Click and hold on the folder and you can choose the component you want.
Line 18: Line 42:
http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=445 http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=445
-== Stub Applications ==+===Macros===
-You can also download a set of stub applications for each of the different components from http://www.toonetown.com/projects/downloads/NeoOfficeApps.zip. These stubs only work with the 2.0+ releases of NeoOffice for PPC.+
- +
-Once unzipped, you need to place the applications from the NeoOfficeApps folder inside your <tt>/Applications</tt> folder (or wherever NeoOffice is installed).+
- +
-You can then use those applications as if they were stand-alone applications (put them in the Dock, drop files onto them, etc.).+
- +
-They use the OpenOffice.org icon set because corresponding icons for NeoOffice do not exist.+
- +
-'''N.B.''' There are some limitations to what the stub applications can do; see the discussion in [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&p=20280#20280 this and following] posts on trinity.+
- +
-==Macros==+
NeoOffice macro and database wizard fabrizio offered the following macro to launch NeoOffice into a particular application. NeoOffice macro and database wizard fabrizio offered the following macro to launch NeoOffice into a particular application.
Line 56: Line 69:
[http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&p=21081#21081 Thread on trinity] discussing this macro. [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&p=21081#21081 Thread on trinity] discussing this macro.
-==CFBundleExecutable==+===NOMu===
 + 
 +[http://singer.sh/software/nomu/ NOMu] is a third-party menu item that will launch NeoOffice into the selected component (as well as provide access to recent documents and other functions).
 + 
 +==Obsolete Methods for Older NeoOffice Versions==
 + 
 +These methods are here only for historical reference for older NeoOffice versions.
 + 
 +===Stub Applications===
 +You can also download a set of stub applications for each of the different components from http://www.toonetown.com/projects/downloads/NeoOfficeApps.zip. These stubs only work with the 2.0 releases of NeoOffice for PPC.
 + 
 +Once unzipped, you need to place the applications from the NeoOfficeApps folder inside your <tt>/Applications</tt> folder (or wherever NeoOffice is installed).
 + 
 +You can then use those applications as if they were stand-alone applications (put them in the Dock, drop files onto them, etc.).
 + 
 +They use the OpenOffice.org icon set because corresponding icons for NeoOffice do not exist.
 + 
 +'''N.B.''' There are some limitations to what the stub applications can do; see the discussion in [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&p=20280#20280 this and following] posts on trinity.
 + 
 +===CFBundleExecutable===
It is also possible to define a custom executable in order to start NeoOffice in another component or to pass command line startup flags to NeoOffice. It is also possible to define a custom executable in order to start NeoOffice in another component or to pass command line startup flags to NeoOffice.
Line 63: Line 95:
'''N.B.''' Any patch which changes '''Info.plist''' will overwrite your new choice of CFBundleExecutable, as will any new version of NeoOffice, so you will need to repeat these steps afterwards. '''N.B.''' Any patch which changes '''Info.plist''' will overwrite your new choice of CFBundleExecutable, as will any new version of NeoOffice, so you will need to repeat these steps afterwards.
-===Sample shell script===+====Sample shell script====
<pre>#!/bin/sh <pre>#!/bin/sh
Line 71: Line 103:
This script, when saved as an executable file (e.g. <tt>/Applications/NeoOffice.app/Contents/MacOS/soffice-nodefault</tt>) and set as the CFBundleExecutable will start NeoOffice without the default Writer document. This follows the format used by the existing '''swriter''', '''scalc''', etc., scripts within NeoOffice. This script, when saved as an executable file (e.g. <tt>/Applications/NeoOffice.app/Contents/MacOS/soffice-nodefault</tt>) and set as the CFBundleExecutable will start NeoOffice without the default Writer document. This follows the format used by the existing '''swriter''', '''scalc''', etc., scripts within NeoOffice.
-====References====+=====References=====
This [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=3660 trinity thread] discusses changing the CFBundleExecutable. This [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=3660 trinity thread] discusses changing the CFBundleExecutable.
-==Launcher Applications==+===Launcher Applications===
A launcher application is under development [[Launcher - Developer|here]]. A launcher application is under development [[Launcher - Developer|here]].
- 
-==NOMu== 
- 
-[http://singer.sh/software/nomu/ NOMu] is a third-party menu item that will launch NeoOffice into the selected component (as well as provide access to recent documents and other functions). 
{{botlangbarEN|[[de:Start-Kurzbefehle_f%C3%BCr_NeoOffice|Deutsch]] [[Fr:Document_par_d%C3%A9faut_%C3%A0_l%27ouverture|Français]] [[Es:C%c3%b3mo_cambiar_el_componente_predeterminado|Español]]}} {{botlangbarEN|[[de:Start-Kurzbefehle_f%C3%BCr_NeoOffice|Deutsch]] [[Fr:Document_par_d%C3%A9faut_%C3%A0_l%27ouverture|Français]] [[Es:C%c3%b3mo_cambiar_el_componente_predeterminado|Español]]}}
[[Category:Tips and Hints]][[Category:NeoOffice]][[Category:OpenOffice.org]] [[Category:Tips and Hints]][[Category:NeoOffice]][[Category:OpenOffice.org]]

Revision as of 00:25, 10 August 2009

This article is not up to date, or it needs structural or stylistic changes to conform with the rest of this wiki.

There are several methods which allow you to launch NeoOffice into a particular application rather than into Writer.

Beginning in NeoOffice 3.0 Patch-6 and NeoOffice 2.2.5 Patch-14, NeoOffice supports a Mac OS X user default to specify the launch behavior (which module or files to open on launch). This is the preferred way to change NeoOffice's launch behavior. The default, however, remains opening a new blank Writer document.

Contents

Modifying NeoOffice's Behavior with User Defaults

Open the /Applications/Utilities/Terminal application, copy one of the following commands into the Terminal window, press Return, and then start NeoOffice.

  • To start with NeoOffice with a Calc, Impress, Math/Formula, or Base document, use:
    • Calc:
      defaults write org.neooffice.NeoOffice DefaultLaunchOptions -calc
    • Impress:
      defaults write org.neooffice.NeoOffice DefaultLaunchOptions -impress
    • Base:
      defaults write org.neooffice.NeoOffice DefaultLaunchOptions -base
    • Formula:
      defaults write org.neooffice.NeoOffice DefaultLaunchOptions -math
  • To start without any new document, use:
    defaults write org.neooffice.NeoOffice DefaultLaunchOptions -nodefault
  • If you want to specify more than one launch option, you can also specify a list of options; for example, NeoOffice will open file1.odt and file2.ods (located on your Desktop) when it launches:
    defaults write org.neooffice.NeoOffice DefaultLaunchOptions -array ~/Desktop/file1.odt ~/Desktop/file2.ods
  • To return to the default NeoOffice settings (opening a blank Writer document), use
    defaults delete org.neooffice.NeoOffice DefaultLaunchOptions

Alternate Methods

Depending on your particular needs, the following methods of launching NeoOffice into a particular module or opening a particular document may still be useful to you.

Note that it is also possible to make AppleScript-based "stub" applications for each NeoOffice module using the new DefaultLaunchOptions syntax, but no such applications have yet been written.

Launch Shortcuts

made a template file for each of the components that make up NeoOffice and OpenOffice.org. By selecting the template, you'll launch NeoOffice into that component (provided NeoOffice is default application for those filetypes; if not, just make NeoOffice the default for each of these files). You can stick them in your Dock for one-click launching of the desired component. To take up less space on your Dock, put these templates in a folder, and place the folder on the Dock. Click and hold on the folder and you can choose the component you want.

The files can be found here:

http://neo-downloads.sixthcrusade.com/neoofficeshortcuts_en.zip

http://neo-downloads.sixthcrusade.com/neoofficeshortcuts_de.zip

This is especially helpful for NeoOffice 1.2 and above, which open to a blank Writer document.

You can also create your own template that has all of your normal document settings and use that file in the same manner as these launch shortcuts. See Editing Default Styles and Using Templates.

More information:

http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=445

Macros

NeoOffice macro and database wizard fabrizio offered the following macro to launch NeoOffice into a particular application.

You can easily change which application is loaded on launch with a macro. For example my NeoOffice 1.2 starts opening the database forms using this macro:

sub apri_documento
dim oFrame as object
dim Doc as Object
dim Url as String
oFrame = ThisComponent.getCurrentController().getFrame()
dim leggo(0) as New com.sun.star.beans.PropertyValue

url="file:///Users/fabrizio/Desktop/Archivio/form database/eventi.sdw"

leggo(0).Name="ReadOnly"
leggo(0).Value=TRUE
Doc = oFrame.loadComponentFromUrl(Url, "", 2, leggo())

end sub

You can change the macro, and after you have everything configured, choose Customize (Configure in NeoOffice 1.2) from the Tools menu; then go to the "Events" tab and link the macro to the "Start Application" event.

References

Thread on trinity discussing this macro.

NOMu

NOMu is a third-party menu item that will launch NeoOffice into the selected component (as well as provide access to recent documents and other functions).

Obsolete Methods for Older NeoOffice Versions

These methods are here only for historical reference for older NeoOffice versions.

Stub Applications

You can also download a set of stub applications for each of the different components from http://www.toonetown.com/projects/downloads/NeoOfficeApps.zip. These stubs only work with the 2.0 releases of NeoOffice for PPC.

Once unzipped, you need to place the applications from the NeoOfficeApps folder inside your /Applications folder (or wherever NeoOffice is installed).

You can then use those applications as if they were stand-alone applications (put them in the Dock, drop files onto them, etc.).

They use the OpenOffice.org icon set because corresponding icons for NeoOffice do not exist.

N.B. There are some limitations to what the stub applications can do; see the discussion in this and following posts on trinity.

CFBundleExecutable

It is also possible to define a custom executable in order to start NeoOffice in another component or to pass command line startup flags to NeoOffice.

Simply create a small shell script, save it inside your NeoOffice.app/Contents/MacOS folder, and edit the entry for CFBundleExecutable in NeoOffice's Info.plist to point to your new script. Then move NeoOffice to a new folder and then move it back to /Applications (this forces LaunchServices to update its cached copy of NeoOffice's Info.plist).

N.B. Any patch which changes Info.plist will overwrite your new choice of CFBundleExecutable, as will any new version of NeoOffice, so you will need to repeat these steps afterwards.

Sample shell script

#!/bin/sh

cmd=`dirname "$0"`/soffice.bin
exec "$cmd" -nodefault "$@"

This script, when saved as an executable file (e.g. /Applications/NeoOffice.app/Contents/MacOS/soffice-nodefault) and set as the CFBundleExecutable will start NeoOffice without the default Writer document. This follows the format used by the existing swriter, scalc, etc., scripts within NeoOffice.

References

This trinity thread discusses changing the CFBundleExecutable.

Launcher Applications

A launcher application is under development here.


This article in other languages:
Personal tools