Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 55e1084c3c80cdea82f6deaf5a7b83c2 > files > 15

gnumed-docs-0.9.9-4.fc14.noarch.rpm


<h1><a name="Customizing_GNUmed_client_startu"></a>  Customizing GNUmed client startup and shutdown </h1>
<p />
There are several built-in hooks for customization of the startup/shutdown process. this is over and above any custom shell scripts/batch files by which to launch the client, and/or hacking of the Python source code itself to achieve any needed behaviour.
<p />
<div class="twikiToc"> <ul>
<li> <a href="#Startup"> Startup</a> <ul>
<li> <a href="#shell_command_line"> shell command line</a>
</li> <li> <a href="#launcher_shell_script_usr_bin_gn"> launcher shell script: /usr/bin/gnumed</a>
</li> <li> <a href="#launcher_Python_script_gnumed_py"> launcher Python script: gnumed.py </a>
</li> <li> <a href="#other_customization_of_client_st"> other customization of client startup (plugins, workplaces)</a>
</li></ul> 
</li> <li> <a href="#Shutdown"> Shutdown</a>
</li></ul> 
</div>
<p />
<h2 class="twikinetRoundedAttachments"><span class="twikinetHeader"><a name="Startup"></a> Startup </span></h2>
<p />
<h3><a name="shell_command_line"></a> shell command line </h3>
<p />
The GNUmed client accepts a few command line options. They are documented in the <a href="http://cvs.savannah.gnu.org/viewcvs/gnumed/gnumed/client/doc/man-pages/gnumed.1?root=gnumed&amp;view=markup" rel="nofollow" target="_top">man page</a>. The options are passed to the <code>/usr/bin/gnumed</code> launcher shell script and eventually to the <code>gnumed.py</code> Python launcher script.
<p />
In particular, it may be convenient to use <code><b>--conf-file</b></code> to specify the use of a config file other than what GNUmed would have used by default. This is addressed further in <a href="GmManualConfigFiles.html" class="twikiLink">GmManualConfigFiles</a>.
<p />
<h3><a name="launcher_shell_script_usr_bin_gn"></a> launcher shell script: <code>/usr/bin/gnumed</code> </h3>
<p />
The client is usually launched with the <code>/usr/bin/gnumed</code> shell script which is included in the release tarball. This script looks for
<p /> <ul>
<li> <code>/etc/gnumed/gnumed-startup-local.sh</code> <ul>
<li> can be used for site-wide "local" customization
</li></ul> 
</li></ul> 
<p /> <ul>
<li> <code>~/.gnumed/scripts/gnumed-startup-local.sh</code> <ul>
<li> can be used for user-specific customization
</li></ul> 
</li></ul> 
<p />
and executes them (in that order) if they exist. Both scripts can do anything the user launching <code>/usr/bin/gnumed</code> can do (unless they are setuid-root). GNUmed as a project will never overwrite those files (but your package manager may decide to provide an updated <code>/etc/gnumed/gnumed-startup-local.sh</code> from time to time).
<p />
<h3><a name="launcher_Python_script_gnumed_py"></a> launcher Python script: <code>gnumed.py</code> </h3>
<p />
When this script has been called the client as such is running. During startup, two <a href="GmManualHooksFramework.html" class="twikiLink">hooks</a> provide for customization:
<p /> <ul>
<li> hook <code>startup-before-GUI</code> <ul>
<li> this is called before the wxPython GUI is initialized
</li></ul> 
</li></ul> 
<p /> <ul>
<li> hook <code>startup-post-GUI-init</code> <ul>
<li> this is called after the wxPython GUI has been initialized but before flow control is handed to user input
</li></ul> 
</li></ul> 
<p />
Among other things, connecting to the backend <a href="GmManualCustomizingBackendLogin.html" class="twikiLink">(which can be customized as well)</a> happens between those two hooks.
<p />
<h3><a name="other_customization_of_client_st"></a> other customization of client startup (plugins, workplaces) </h3>
<p />
Additional configuration can include the selection of plugins that are to be loaded into the GNumed toolbar, and their order. This is treated further in <a href="WorkPlace.html" class="twikiLink">WorkPlaces</a>.
<p />
<hr />
<h2 class="twikinetRoundedAttachments"><span class="twikinetHeader"><a name="Shutdown"></a> Shutdown </span></h2>
<p />
During shutdown the hook <code>shutdown-post-GUI</code> is called when the wxPython GUI has been closed.
<p />
<hr />
<p />
<hr />