rework the section/subsection scheme to compress the TOC;
[working/Evergreen.git] / 1.6 / admin / StaffclientInstallation.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter xmlns="" xmlns:xi="" xmlns:xl="">
3         <section xml:id="serversideinstallation-staffclient">
4                 <title>Installing the Staff Client</title>
5                 <para>The Staff Client is automatically built by default as part of the normal <emphasis>make install</emphasis> process for Evergreen server-side software. See the section <xref linkend="serversideinstallation-compilingevergreen"/> to review details related to building the Staff Client in the final compile/link/install phase of the default Evergreen build process. See the section <xref linkend="serversideinstallation-building-staffclient"/> for help on manually building the Staff Client. Otherwise, continue with the following sections to install a pre-built Staff Client.</para>
6                 <simplesect xml:id="serversideinstallation-prebuilt-staffclient">
7                         <title>Installing a Pre-Built Staff Client</title>
8                         <para>You can install the Staff Client from pre-built images and packages without actually having to first build it. Pre-built packages are currently available for Windows, MAC OS X, and Linux. If you need to manually build the Staff Client, see the section <xref linkend="serversideinstallation-building-staffclient"/>.</para>
9                         <simplesect>
10                                 <title>Installing on Windows</title>
11                                 <para>A standard Microsoft Windows installer that contains the current version of the Staff Client is available from the downloads section of the Evergreen website at <ulink url=""></ulink>. Download the staff client installer, then run it. A screen that looks similar to this should appear:</para>
12                                 <figure>
13                                         <title>Running the Staff Client installer</title>
14                                         <mediaobject>
15                                                 <imageobject>
16                                                         <imagedata fileref="../media/serversideinstallation-staffclient-1.png" scalefit="1" width="70%"/>
17                                                 </imageobject>
18                                         </mediaobject>
19                                 </figure>
20                                 <para>Click the <emphasis>Next</emphasis> button to continue through the guided install process. The install wizard will ask you to agree to the end-user license, ask you where to install the software, ask about where to place icons, and then will install the software on your workstation.</para>
21                                 <para>When you run the staff client for the first time, a screen similar to this should appear:</para>
22                                 <figure>
23                                         <title>Running the Staff Client for the first time</title>
24                                         <mediaobject>
25                                                 <imageobject>
26                                                         <imagedata fileref="../media/serversideinstallation-staffclient-2.png" scalefit="1" width="70%"/>
27                                                 </imageobject>
28                                         </mediaobject>
29                                 </figure>
30                                 <para>First, configure the server you would like to connect to in the <emphasis role="bold">Server</emphasis> section. For example, the PINES demo system is <emphasis role="bold"></emphasis>. After selecting a server, click the <emphasis role="bold">Re-Test Server</emphasis> button.</para>
31                                 <para>Because this is the initial run of the staff client, the <emphasis role="bold">Workstation</emphasis> section in the upper-right states: <emphasis role="bold">Not yet configured for the specified server</emphasis>. The first thing that must be done to the Staff Client on every workstation is to assign it a workstation name. This is covered in the section <xref linkend="serversideinstallation-workstationnames"/>.</para>
32                         </simplesect>
33                         <simplesect>
34                                 <title>Installing on Mac OS X</title>
35                                 <para>A Mac package that contains the current version of the Staff Client is available for use with XULRunner.</para>
36                                 <itemizedlist>
37                                         <listitem>
38                                                 <para>Evergreen Indiana Pkg file [Evergreen v1.2.3.0]</para>
39                                                 <orderedlist>
40                                                         <listitem>Download and install the latest version of XULRunner for Mac OS. Release notes for the latest version can be found here: <ulink url=""></ulink>. Note, later versions may not work correctly.</listitem>
41                                                         <listitem>Download and install the Mac Installation package for the 1_2_3_0 Version Staff Client from <ulink url=""></ulink>.</listitem>
42                                                         <listitem>To upgrade to a more recent version of the staff client, you can copy the "build" directory from a working Windows installation of the desired version of the staff client to your Mac. The required files may be located in a directory like this on the Windows machine: <emphasis>C:\Program Files\Evergreen Staff Client\build</emphasis>. Copy these files into the "Resources" folder within the Open-ILS package in your Applications directory on the Mac, overwriting files with the same names.</listitem>
43                                                         <listitem>Drag the application's icon into your toolbar for easier access.</listitem>
44                                                 </orderedlist>
45                                                 <para/>
46                                                 <para>When you run the staff client installer, a screen will appear that looks similar to this:</para>
47                                                 <figure>
48                                                         <title>Running the Staff Client installer</title>
49                                                         <mediaobject>
50                                                                 <imageobject>
51                                                                         <imagedata fileref="../media/serversideinstallation-staffclient-3.png" scalefit="1" width="20%"/>
52                                                                 </imageobject>
53                                                         </mediaobject>
54                                                 </figure>
55                                                 <caution> FIX BAD LINK: </caution>
56                                                 <para>Click continue, accept the license, then finish the installation. The application will be located at the destination you selected during installation. You will then be able to drag the application into your toolbar for easier access.</para>
57                                                 <figure>
58                                                         <title>Finishing the installation</title>
59                                                         <mediaobject>
60                                                                 <imageobject>
61                                                                         <imagedata fileref="../media/serversideinstallation-staffclient-4.png" scalefit="1" width="20%"/>
62                                                                 </imageobject>
63                                                         </mediaobject>
64                                                 </figure>
65                                                 <caution> FIX BAD LINK: </caution>
66                                         </listitem>
67                                         <listitem>
68                                                 <para>Running directly using XULRunner</para>
69                                                 <para>You must install an apropriate version of XULRunner to match the Evergreen version. See the following table for the recommended version of XULRunner:</para>
70                                                 <table>
71                                                         <title>Evergreen / XULRunner Dependencies</title>
72                                                         <tgroup align="left" cols="2" colsep="1" rowsep="1">
73                                                                 <colspec colnum="1" colwidth="1*"/>
74                                                                 <colspec colnum="2" colwidth="3*"/>
75                                                                 <tbody>
76                                                                         <row>
77                                                                                 <entry>Evergreen 1.6.x.x</entry>
78                                                                                 <entry>XULrunner 1.9</entry>
79                                                                         </row>
80                                                                         <row>
81                                                                                 <entry>Evergreen 1.4.x.x</entry>
82                                                                                 <entry>XULrunner or XULrunner</entry>
83                                                                         </row>
84                                                                         <row>
85                                                                                 <entry>Evergreen 1.2.x.x</entry>
86                                                                                 <entry>XULrunner or XULrunner</entry>
87                                                                         </row>
88                                                                 </tbody>
89                                                         </tgroup>
90                                                 </table>
91                                                 <note>If you have issues removing previously installed XULRunner versions see <xref linkend="serversideinstallation-staffclient-remove-xulrunner"/> for information on removing previous XULRunner versions.</note>
92                                                 <para>The staff client data from the <emphasis>./staff_client/build</emphasis> directory must be placed somewhere on the machine (e.g. <emphasis>~/Desktop/Evergreen_Staff_Client</emphasis>). Remember to call XULRunner with the full path to the binary, followed by the install command and the path to the client data. See the following command:</para>
93                                                 <figure>
94                                                         <title>Executing XULRunner</title>
95                                                         <screen>
96                                         /Library/Frameworks/XUL.framework/xulrunner-bin --install-app ~/Desktop/Evergreen_Staff_Client
97                                         </screen>
98                                                 </figure>
99                                                 <para>This command should exit quietly. A folder will be created, named <emphasis>/Applications/OpenILS</emphasis>, containing a launcher named <emphasis>open_ils_staff_client</emphasis>.</para>
100                                         </listitem>
101                                         <listitem xml:id="serversideinstallation-staffclient-remove-xulrunner">
102                                                 <para>Removing previously installed XULRunner versions</para>
103                                                 <para>If you already have a newer version installed, per the release notes, you will need to remove the entire directory <emphasis>/Library/Frameworks/XUL.framework</emphasis> before downgrading.</para>
104                                                 <para>In addition, you may also need to remove the previous file <emphasis>/Library/Receipts/xulrunner-ver-mak.pkg</emphasis>.</para>
105                                                 <para>If there is no file <emphasis>/Library/Receipts/xulrunner-ver-mak.pkg</emphasis> (possibly in newer OSX releases) you need to flush the <emphasis>receiptdb</emphasis> file.</para>
106                                                 <note>If you install a newer version over a previous (older) install, the older one is not removed but the symlinks get changed to the newer one.</note>
107                                                 <para>First, get the package identifier, then purge/forget the build that was initially installed:</para>
108                                                 <figure>
109                                                         <title>Purging previous build</title>
110                                                         <screen>
111                                         sudo pkgutil --pkgs > /tmp/pkgs.txt
112                                         sudo pkgutil --forget org.mozilla.xulrunner
113                                         </screen>
114                                                 </figure>
115                                                 <note>It may not be necessary to edit the file <emphasis>/Library/Receipts/InstallHistory.plist</emphasis> after deleting the folder <emphasis>XUL.framework</emphasis>.</note>
116                                         </listitem>
117                                         <listitem>
118                                                 <para>Creating an APP file: Staff Client &amp; XULRunner Bundled</para>
119                                                 <para>An APP file is basically a folder. Start with a folder stucture like this:</para>
120                                                 <figure>
121                                                         <title>Sample APP file folder structure</title>
122                                                         <screen>
123                                         *
124                                           * Contents
125                                             * Frameworks
126                                             * Resources
127                                             * MacOS
128                                         </screen>
129                                                 </figure>
130                                                 <para>Create an APP folder structure with the following commands:</para>
131                                                 <figure>
132                                                         <title>Creating a folder structure</title>
133                                                         <screen>
134                                         mkdir -p
135                                         mkdir -p
136                                         mkdir -p
137                                         </screen>
138                                                 </figure>
139                                                 <para/>
140                                                 <orderedlist>
141                                                         <listitem>
142                                                                 <para>Create a new file in the folder <emphasis></emphasis> containing the following data (adjust for your version of Evergreen):</para>
143                                                                 <figure>
144                                                                         <title>Creating a new file</title>
145                                                                         <screen>
146                                                         &lt;?xml version="1.0" encoding="UTF-8"?>
147                                                         &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
148                                                         &lt;plist version="1.0">
149                                                         &lt;dict>
150                                                                &lt;key>CFBundleExecutable&lt;/key>
151                                                                &lt;string>xulrunner&lt;/string>
152                                                                &lt;key>CFBundleGetInfoString&lt;/key>
153                                                                &lt;string>OpenILS open_ils_staff_client rel_1_6_0_7&lt;/string>
154                                                                &lt;key>CFBundleInfoDictionaryVersion&lt;/key>
155                                                                &lt;string>6.0&lt;/string>
156                                                                &lt;key>CFBundleName&lt;/key>
157                                                                &lt;string>Evergreen Staff Client&lt;/string>
158                                                                &lt;key>CFBundlePackageType&lt;/key>
159                                                                &lt;string>APPL&lt;/string>
160                                                                &lt;key>CFBundleShortVersionString&lt;/key>
161                                                                &lt;string>rel_1_6_0_7&lt;/string>
162                                                                &lt;key>CFBundleVersion&lt;/key>
163                                                                &lt;string>rel_1_6_0_7.rel_1_6_0_7&lt;/string>
164                                                                &lt;key>NSAppleScriptEnabled&lt;/key>
165                                                                &lt;true/>
166                                                                &lt;key>CFBundleTypeIconFile&lt;/key>
167                                                                &lt;string>Evergreen.icns&lt;/string>
168                                                         &lt;/dict>
169                                                         &lt;/plist>
170                                                         </screen>
171                                                                 </figure>
172                                                         </listitem>
173                                                         <listitem>Download and install an appropriate Mac OS package of XULRunner from the Mozilla website (see above for recommendations).</listitem>
174                                                         <listitem>
175                                                                 <para>Make a copy of <emphasis>/Library/Frameworks/XUL.Framework</emphasis> inside your APP file. It should look something like this:</para>
176                                                                 <figure>
177                                                                         <title>Example of APP file framework</title>
178                                                                         <screen>
179                                                         *
180                                                         __* Contents/
181                                                         ____* Frameworks/
182                                                         ______* XUL.Framework/
183                                                         ______* Versions/
184                                                         ________* Current -> (symlink)
185                                                         ________*
186                                                         ______* XUL -> Versions/Current/XUL
187                                                         ______* libxpcom.dylib -> Versions/Current/libxpcom.dylib
188                                                         ______* xulrunner-bin -> Versions/Current/xulrunner-bin
189                                                         </screen>
190                                                                 </figure>
191                                                         </listitem>
192                                                         <listitem>Copy <emphasis>XUL.Framework/Versions/Current/xulrunner</emphasis> into <emphasis></emphasis> (do not symlink; copy the file).</listitem>
193                                                         <listitem>
194                                                                 <para>Make <emphasis></emphasis> the root of your Evergreen application files like this:</para>
195                                                                 <figure>
196                                                                         <title>Example APP file</title>
197                                                                         <screen>
198                                                         *
199                                                         __* Contents/
200                                                         ____* Resources/
201                                                         ______* BUILD_ID
202                                                         ______* application.ini
203                                                         ______* chrome/
204                                                         ______* components/
205                                                         ______* etc.
206                                                         </screen>
207                                                                 </figure>
208                                                         </listitem>
209                                                         <listitem>Put a Mac format icon file named <emphasis>Evergreen.icns</emphasis> in Resources.</listitem>
210                                                 </orderedlist>
211                                         </listitem>
212                                 </itemizedlist>
213                         </simplesect>
214                         <simplesect xml:id="serversideinstallation-staffclient-linux">
215                                 <title>Installing on Linux</title>
216                                 <section>
217                                         <title>Quick Upgrade of the Staff Client</title>
218                                         <para>A Linux Staff Client is automatically built on the server as part of the normal <emphasis>make install</emphasis> process for Evergreen server-side software. To upgrade the Staff Client on a remote workstation with a new version, just copy the directory tree containing the Staff Client from the server to the remote workstation.</para>
219                                         <para>The following example assumes you already have an "opensrf" user account on both the server and the remote workstation. Remember to replace "user", "client.linux.machine" and "eg-client-x.x.x.x" with the proper user name, client machine name, and version number in the following example.</para>
220                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then recursively copy the entire directory tree to the remote workstation:</para>
221                                         <figure>
222                                                 <title>Copying the Staff Client to a remote workstation</title>
223                                                 <screen>
224                                         $ su - opensrf
225                                         $ cd /home/opensrf/Evergreen-ILS-
226                                         $ scp -r build user@client.linux.machine:~/eg-client-x.x.x.x/
227                                         </screen>
228                                         </figure>
229                                         <para>To test the newly copied Staff Client, as the <emphasis role="bold">opensrf</emphasis> user log into the remote workstation and execute it as shown:</para>
230                                         <figure>
231                                                 <title>Testing the copied Staff Client</title>
232                                                 <screen>
233                                         $ su - opensrf
234                                         $ xulrunner ~/eg-client-x.x.x.x/build/application.ini
235                                         </screen>
236                                         </figure>
237                                 </section>
238                                 <section>
239                                         <title>Building the Staff Client on the Server</title>
240                                         <para>A Linux Staff Client is automatically built on the server as part of the normal <emphasis>make install</emphasis> process for Evergreen server-side software.</para>
241                                         <para>In order to install a compatible Staff Client on another Linux system, just copy the applicable files from the server to that system, or even manually build it on that system. Ensure that the BUILD_ID you choose on the server matches the BUILD_ID for each staff client you use on other systems.</para>
242                                         <para>If you will be using a pre-packaged Windows version on some systems, you may want to choose the BUILD_ID on both server and other versions to match that of the Windows Staff Client. To determine which BUILD_ID is used in an existing Staff Client installation, just click "About this Client" on the running Staff Client.</para>
243                                         <para>If you are allowed to make changes on the Evergreen server, another option is to create a symbolic link. In order for a copy of the Staff Client and server to work together, the BUILD_ID must match the name of the directory containing the server components of the Staff Client, or the name of a symbolic link to that directory.</para>
244                                         <figure>
245                                                 <title>Creating a symbolic link</title>
246                                                 <screen>
247                                         $ su - root
248                                         $ cd /openils/var/web/xul
249                                         $ ln -s SERVER_BUILD_ID/ CLIENT_BUILD_ID
250                                         </screen>
251                                         </figure>
252                                 </section>
253                                 <section>
254                                         <title>Building the Staff Client on the client Machine</title>
255                                         <para>This section is directed toward end-users who wish to use Linux rather than Windows for client machines, but have limited Linux experience. You can build the Staff Client on a Linux system without installing the Evergreen Server component. This is a relatively simple process compared to server installation, but does require some command-line work. The following directions are for building Staff Client version on Kubuntu 7.10; you must modify them for other distributions (the instructions should work as-is for Ubuntu or Ubuntu derivatives).</para>
256                                         <procedure>
257                                                 <step>
258                                                         <para>Prerequisites</para>
259                                                         <para>Both "subversion" and "xulrunner" are required to build the Staff Client. As the <emphasis role="bold">root</emphasis> user, use "apt-get" to install packages for "subversion" and "xulrunner". You can also use "synaptic", the graphical user interface for "apt-get". For "subversion", select the latest version; for "xulrunner", select version <emphasis></emphasis>.</para>
260                                                         <figure>
261                                                                 <title>Installing subversion and xulrunner</title>
262                                                                 <screen>
263                                                         $ sudo apt-get install subversion
264                                                         $ sudo apt-get install xulrunner
265                                                         </screen>
266                                                         </figure>
267                                                 </step>
268                                                 <step>
269                                                         <para>Download the Source Code</para>
270                                                         <itemizedlist>
271                                                                 <listitem>
272                                                                         <para>Determine which version is needed</para>
273                                                                         <para>For most end-users, a specific version is required to communicate properly with the Evergreen server. Check with your system admininstrator, IT person, or HelpDesk to determine which Staff Client versions are supported.</para>
274                                                                         <para>Next, you need to determine which <emphasis>tag</emphasis> to use when downloading the source code. Tags are markers in the source code to create a snapshot of the code as it existed at a certain time; tags usually point to tested and stable code, or at least a community-recognized release version.</para>
275                                                                         <para>To determine which tag to use, browse to <ulink url=""></ulink>. Look in the "Visit" drop-down box; see the list of Branches and, further down, a list of Tags. You may have to do some guesswork, but it is fairly straightforward to determine which tag to use. If the server is version, you will want to use the tag that looks most appropriate. For example, as you look through the tag list, notice the tag named 'rel_1_2_1_4'. This is the tag you need; make a note of it for the next step.</para>
276                                                                 </listitem>
277                                                                 <listitem>
278                                                                         <para>Download the Code</para>
279                                                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, open a terminal (command-line prompt) and navigate to the directory in which you wish to download the Staff Client. Use the following commands to download the proper version of the source code by tag name:</para>
280                                                                         <figure>
281                                                                                 <title>Downloading the source code</title>
282                                                                                 <screen>
283                                                                         $ su - opensrf
284                                                                         $ cd /YOUR/DOWNLOAD/DIRECTORY
285                                                                         $ svn co svn://
286                                                                         </screen>
287                                                                         </figure>
288                                                                         <para>Remember to change "rel_1_2_1_4" to the appropriate tag for your installation.</para>
289                                                                 </listitem>
290                                                         </itemizedlist>
291                                                 </step>
292                                                 <step>
293                                                         <para>Build the Staff Client</para>
294                                                         <itemizedlist>
295                                                                 <listitem>
296                                                                         <para>Evergreen 1.2.x</para>
297                                                                         <para>In the following example, navigate to the directory in which the source code was downloaded, then navigate to the proper subdirectory and run the "make" utility to actually build the Staff Client. Remember to check with your system administrator about which Staff Client BUILD_ID to use. The server checks the Staff Client BUILD_ID against itself to determine whether or not a connecting client is supported. For instance, for the PINES installation (version the supported BUILD_ID is "rel_1_2_1_4". Modify the following commands accordingly.</para>
298                                                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, run the following commands to build the Staff Client:</para>
299                                                                         <figure>
300                                                                                 <title>Finding the downloaded source code</title>
301                                                                                 <screen>
302                                                                 $ su - opensrf
303                                                                 $ cd /YOUR/DOWNLOAD/DIRECTORY
304                                                                 $ cd Open-ILS/xul/staff_client
305                                                                 $ make STAFF_CLIENT_BUILD_ID='rel_1_2_1_4'
306                                                                 ...
307                                                                 </screen>
308                                                                         </figure>
309                                                                 </listitem>
310                                                                 <listitem>
311                                                                         <para>Evergreen 1.4.x</para>
312                                                                         <para>The 1.4 series of Evergreen has complicated the build process for the Staff Client a bit. If you downloaded a .tar.gz (compressed tar archive) of Evergreen, then your steps will resemble the following:</para>
313                                                                         <caution>FIXME -- Need instructions for getting certain Javascript files from OpenSRF, preferably without actually installing OpenSRF.
314 </caution>
315                                                                         <figure>
316                                                                                 <title>Building 1.4.x</title>
317                                                                                 <screen>
318                                                                 $ su - opensrf
319                                                                 $ wget
320                                                                 $ tar xfz Evergreen-ILS-
321                                                                 $ cd Evergreen-ILS-
322                                                                 $ ./configure --prefix=/openils --sysconfdir=/openils/conf
323                                                                 $ cd Open-ILS/xul/staff_client/
324                                                                 $ make STAFF_CLIENT_BUILD_ID='rel_1_4_0_4' install
325                                                                 </screen>
326                                                                         </figure>
327                                                                         <para/>
328                                                                         <para>If you're installing from a Subversion checkout:</para>
329                                                                         <figure>
330                                                                                 <title>Building from a "subversion" checkout</title>
331                                                                                 <screen>
332                                                                 $ su - opensrf
333                                                                 $ svn co svn://
334                                                                 $ cd rel_1_4_0_4
335                                                                 $ ./   # If you downloaded a .tar.gz of Evergreen, you may skip this step
336                                                                 $ ./configure --prefix=/openils --sysconfdir=/openils/conf
337                                                                 $ cd Open-ILS/xul/staff_client/
338                                                                 $ make STAFF_CLIENT_BUILD_ID='rel_1_4_0_4' install
339                                                                 </screen>
340                                                                         </figure>
341                                                                 </listitem>
342                                                         </itemizedlist>
343                                                 </step>
344                                                 <step>
345                                                         <para>Run the Staff Client (from the command line)</para>
346                                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, navigate to the <emphasis>build/</emphasis> subdirectory (not <emphasis>staff_client/</emphasis>) and run the following command:</para>
347                                                         <figure>
348                                                                 <title>Running the Staff Client</title>
349                                                                 <screen>
350                                                         $ su - opensrf
351                                                         $ xulrunner application.ini
352                                                         </screen>
353                                                         </figure>
354                                                 </step>
355                                                 <step>
356                                                         <para>(OPTIONAL) Cleaning Up / Creating Shortcuts</para>
357                                                         <para>The source code download included many files that are needed to build the Staff Client, but are not necessary to run it. You may wish to remove them to save space, or to create a clean directory containing the built staff client that can be copied to other machines. To create a clean "staging" directory in which to place the finished staff client, issue the following commands:</para>
358                                                         <figure>
359                                                                 <title>Creating a "staging" directory</title>
360                                                                 <screen>
361                                                         $ mkdir ~/&lt;Destination Directory>
362                                                         $ cd ~/&lt;Download Directory>/Open-ILS/xul/
363                                                         $ cp -r staff_client ~/&lt;Destination Directory>
364                                                         </screen>
365                                                         </figure>
366                                                         <para>Finally, test the Staff Client to verify that all the necessary files were moved to the destination directory:</para>
367                                                         <figure>
368                                                                 <title>Testing the copied Staff Client</title>
369                                                                 <screen>
370                                                         $ cd ~/&lt;Destination Directory>/staff_client/build
371                                                         $ xulrunner application.ini
372                                                         </screen>
373                                                         </figure>
374                                                         <para>If there were no problems, then finish the cleanup by removing the original download directory and all subdirectories:</para>
375                                                         <figure>
376                                                                 <title>Cleaning up</title>
377                                                                 <screen>
378                                                         $ rm -r -f ~/&lt;Download Directory>
379                                                         </screen>
380                                                         </figure>
381                                                         <para>Finally, test the copied Staff Client. You can create "Desktop / Start Menu / K-Menu" shortcuts for the Staff Client by using the following command as the target:</para>
382                                                         <figure>
383                                                                 <title>Running the copied Staff Client</title>
384                                                                 <screen>
385                                                         $ xulrunner ~/&lt;Destination Directory>/staff_client/build/application.ini
386                                                         </screen>
387                                                         </figure>
388                                                 </step>
389                                         </procedure>
390                                 </section>
391                                 <section>
392                                         <title>Using Wine to Install On Linux</title>
393                                         <para>The Linux application <emphasis>Wine</emphasis> is another alternative for those who wish to install the packaged Windows versions rather than building the Staff Client manually. Wine is a Linux application that allows users to directly run Windows executables, and is a simple way for casual Linux users to use the Staff Client. More information about Wine can be found at <ulink url=""></ulink>.</para>
394                                         <para>As the <emphasis role="bold">root</emphasis> user, use "apt-get" to install the package for "wine". You can also use "synaptic", the graphical user interface.</para>
395                                         <orderedlist>
396                                                 <listitem>
397                                                         <para>Install wine</para>
398                                                         <figure>
399                                                                 <title>Installing "wine"</title>
400                                                                 <screen>
401                                                         $ sudo apt-get install wine
402                                                         </screen>
403                                                         </figure>
404                                                 </listitem>
405                                                 <listitem>
406                                                         <para>Download Windows installer for the Staff Client</para>
407                                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, run the following commands to download the Windows installer for the proper Staff Client from the <emphasis></emphasis> website and place it in a temporary directory:</para>
408                                                         <figure>
409                                                                 <title>Downloading the Staff Client installer</title>
410                                                                 <screen>
411                                                         $ su - opensrf
412                                                         $ cd /YOUR/DOWNLOAD/DIRECTORY
413                                                         $ wget
414                                                         </screen>
415                                                         </figure>
416                                                 </listitem>
417                                                 <listitem>
418                                                         <para>Run the downloaded Windows installer</para>
419                                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, navigate to the directory where you downloaded the Windows executable file, then execute it:</para>
420                                                         <figure>
421                                                                 <title>Using Wine to run the Windows installer</title>
422                                                                 <screen>
423                                                         $ su - opensrf
424                                                         $ cd /YOUR/DOWNLOAD/DIRECTORY
425                                                         $ wine evergreen-setup-rel_version-number.exe
426                                                         </screen>
427                                                         </figure>
428                                                         <para>If this step fails, you may need to configure Wine first to properly emulate Windows XP. To do so, type "winecfg" from the command line; in the "Applications" tab of the window that pops up, select "Default Settings" and choose "Windows XP" from the drop-down menu, then click "Apply".</para>
429                                                 </listitem>
430                                                 <listitem>
431                                                         <para>Launch the Staff Client</para>
432                                                         <para>A new entry for the Staff Client should now appear somewhere in the "All Applications" menu of your Linux desktop. Also, find a new desktop shortcut for the Staff Client. To launch the Staff Client, visit the "All Applications" menu, find a section similar to "Wine->Program Files->Evergreen Staff Client->Evergreen Staff Client", or else launch the Staff Client from the desktop shortcut.</para>
433                                                 </listitem>
434                                         </orderedlist>
435                                 </section>
436                                 <section>
437                                         <title>Running the Staff Client over an SSH Tunnel</title>
438                                         <para>The Staff Client can use an SSH tunnel as a SOCKS 5 proxy. For more details, see the section <xref linkend="serversideinstallation-proxy"/>.</para>
439                                 </section>
440                                 <section xml:id="serversideinstallation-workstationnames">
441                                         <title>Assigning Workstation Names</title>
442                                         <para>The Staff Client must be assigned to a library and given a unique name before it will connect fully to the Evergreen server. The only restriction is that the workstation's name must be unique within the assigned library. Make sure to select a workstation name that you will remember later, and reflects the role, purpose, and/or location of a particular computer. These names will come up later in statistical reporting, and can also be handy when troubleshooting.</para>
443                                         <figure>
444                                                 <title>Example of unconfigured Staff Client</title>
445                                                 <mediaobject>
446                                                         <imageobject>
447                                                                 <imagedata fileref="../media/serversideinstallation-staffclient-workstationnames-1.png" scalefit="1" width="70%"/>
448                                                         </imageobject>
449                                                 </mediaobject>
450                                         </figure>
451                                         <para>In order to assign a workstation a name, a user with appropriate permissions must login to the Staff Client. In PINES, the local system administrator (OPSM) has the ability to assign workstation names in his or her library system. Library managers (LIBM's) have the ability within their branch. To assign a workstation a name, login to the system. You will be prompted to assign the workstation a library and a name:</para>
452                                         <figure>
453                                                 <title>Example of configured Staff Client</title>
454                                                 <mediaobject>
455                                                         <imageobject>
456                                                                 <imagedata fileref="../media/serversideinstallation-staffclient-workstationnames-2.png" scalefit="1" width="70%"/>
457                                                         </imageobject>
458                                                 </mediaobject>
459                                         </figure>
460                                         <para>Select the library this workstation physically operates in from the drop down menu. In this example, we have selected "MGRL-MA". Type in a friendly name for the workstation. In this example, we are installing the Staff Client on the director's personal system, and have named it as such. Then hit <emphasis role="bold">Register</emphasis>.</para>
461                                         <para>Once you have registered your workstation with the server, your screen will look like this:</para>
462                                         <figure>
463                                                 <title>Example of registered Staff Client</title>
464                                                 <mediaobject>
465                                                         <imageobject>
466                                                                 <imagedata fileref="../media/serversideinstallation-staffclient-workstationnames-3.png" scalefit="1" width="70%"/>
467                                                         </imageobject>
468                                                 </mediaobject>
469                                         </figure>
470                                         <para>You are now ready to log into the Staff Client for the first time. Type in your password again, and hit <emphasis role="bold">Login</emphasis>.</para>
471                                 </section>
472                         </simplesect>
473                 </simplesect>
474                 <simplesect xml:id="serversideinstallation-building-staffclient">
475                         <title>Manually Building the Staff Client</title>
476                         <para>The Staff Client is automatically built by default as part of the normal <emphasis>make install</emphasis> process for Evergreen server-side software. See the section <xref linkend="serversideinstallation-compilingevergreen"/> to review details related to building the Staff Client in the final compile/link/install phase of the default Evergreen build process.</para>
477                         <section>
478                                 <title>Building the Staff Client</title>
479                                 <para>You can also manually build the Staff Client by using the <emphasis>make</emphasis> utility in the Staff Client source directory (e.g., the directory <emphasis>/home/opensrf/Evergreen-ILS-1.6.0.x/Open-ILS/xul/staff_client</emphasis> for the current Evergreen version). There are a number of possible options to manually build special versions of the Staff Client on a Linux system. Following is a list of environment variables that can be passed to <emphasis>make</emphasis> to influence the manual build process:</para>
480                                 <section>
481                                         <title>Option STAFF_CLIENT_BUILD_ID</title>
482                                         <para>During the normal <emphasis>make install</emphasis> Evergreen server-side software build process, the variable defaults to an automatically generated date/time string, but you can also override the value of BUILD_ID.</para>
483                                         <para>The following commands could be used during the normal build process:</para>
484                                         <figure>
485                                                 <title>Commands used during normal Evergreen build</title>
486                                                 <screen>
487                                         $ su - root
488                                         $ cd /home/opensrf/Evergreen-ILS-
489                                         $ make STAFF_CLIENT_BUILD_ID=rel_1_6_0_7 install
490                                         ...
491                                         </screen>
492                                         </figure>
493                                         <para>The following commands will manually build the Staff Client using a different BUILD_ID.</para>
494                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:</para>
495                                         <figure>
496                                                 <title>Commands to manually build the Staff Client</title>
497                                                 <screen>
498                                         $ su - opensrf
499                                         $ cd /home/opensrf/Evergreen-ILS-
500                                         $ make STAFF_CLIENT_BUILD_ID=my_test_id  build
501                                         ...
502                                         </screen>
503                                         </figure>
504                                 </section>
505                                 <section>
506                                         <title>Option STAFF_CLIENT_VERSION</title>
507                                         <para>During the normal <emphasis>make install</emphasis> Evergreen server-side software build process, the variable is pulled automatically from a README file in the Evergreen source root. The variable defaults to <emphasis>0trunk.revision</emphasis>, where the value of "revision" is automatically generated. You can override the value of VERSION similarly to the BUILD_ID.</para>
508                                         <para>The following commands could be used during the normal build process:</para>
509                                         <figure>
510                                                 <title>Commands used during normal Evergreen build</title>
511                                                 <screen>
512                                         $ su - root
513                                         $ cd /home/opensrf/Evergreen-ILS-
514                                         $ make STAFF_CLIENT_VERSION=0mytest.200 install
515                                         ...
516                                         </screen>
517                                         </figure>
518                                         <para>The following commands will manually build the Staff Client using a different VERSION.</para>
519                                         <para>If you plan to make extensions update automatically, the VERSION needs to conform to the format recommended in <ulink url="">Toolkit Version Format</ulink> and newer versions need to be "higher" than older versions.</para>
520                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:</para>
521                                         <figure>
522                                                 <title>Commands to manually build the Staff Client</title>
523                                                 <screen>
524                                         $ su - opensrf
525                                         $ cd /home/opensrf/Evergreen-ILS-
526                                         $ make STAFF_CLIENT_VERSION=0mytest.200  build
527                                         ...
528                                         </screen>
529                                         </figure>
530                                 </section>
531                                 <section>
532                                         <title>Option STAFF_CLIENT_STAMP_ID variable</title>
533                                         <para>During the normal <emphasis>make install</emphasis> Evergreen server-side software build process, this variable is generated from STAFF_CLIENT_VERSION. You can override the value of STAMP_ID similarly to the BUILD_ID.</para>
534                                         <para>The following commands could be used during the normal build process:</para>
535                                         <figure>
536                                                 <title>Commands used during normal Evergreen build</title>
537                                                 <screen>
538                                         $ su - root
539                                         $ cd /home/opensrf/Evergreen-ILS-
540                                         $ make STAFF_CLIENT_STAMP_ID=my_test_stamp install
541                                         ...
542                                         </screen>
543                                         </figure>
544                                         <para>The following commands will manually build the Staff Client using a different STAMP_ID.</para>
545                                         <para>It is possible to have multiple versions of the Staff Client by specifying a different STAMP_ID for each, possibly for different uses or client-side customizations.</para>
546                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:</para>
547                                         <figure>
548                                                 <title>Commands to manually build the Staff Client</title>
549                                                 <screen>
550                                         $ su - opensrf
551                                         $ cd /home/opensrf/Evergreen-ILS-
552                                         $ make STAFF_CLIENT_STAMP_ID=my_test_stamp  build
553                                         ...
554                                         </screen>
555                                         </figure>
556                                 </section>
557                         </section>
558                         <section>
559                                 <title>Advanced Build Options</title>
560                                 <para>In addition to the basic options listed above, there are a number of advanced options for building the Staff Client. Most are target names for the <emphasis>make</emphasis> utility and require that you build the Staff Client from its source directory. See the following table for a list of possible <emphasis>make</emphasis> target keywords:</para>
561                                 <table>
562                                         <title>Keywords Targets for "make" Command</title>
563                                         <tgroup align="left" cols="2" colsep="1" rowsep="1">
564                                                 <colspec colnum="1" colwidth="1*"/>
565                                                 <colspec colnum="2" colwidth="3*"/>
566                                                 <thead>
567                                                         <row>
568                                                                 <entry>Keyword</entry>
569                                                                 <entry>Description</entry>
570                                                         </row>
571                                                 </thead>
572                                                 <tbody>
573                                                         <row>
574                                                                 <entry>clients</entry>
575                                                                 <entry>Runs "make win-client", "make linux-client", and "make generic-client" individually</entry>
576                                                         </row>
577                                                         <row>
578                                                                 <entry>client_dir</entry>
579                                                                 <entry>Builds a client directory from the build directory, without doing a rebuild. The same as "copy everything but server/".</entry>
580                                                         </row>
581                                                         <row>
582                                                                 <entry>client_app</entry>
583                                                                 <entry>Prerequisite "client_dir"; removes "install.rdf" from client directory so an APP bundle can't be installed as an extension</entry>
584                                                         </row>
585                                                         <row>
586                                                                 <entry>client_ext</entry>
587                                                                 <entry>Prerequisite "client_dir"; remove "application.ini", "autoupdate.js", "standalone_xul_app.js" from client directory so an extension won't break Firefox</entry>
588                                                         </row>
589                                                         <row>
590                                                                 <entry>extension</entry>
591                                                                 <entry>Prerequisite "client_ext"; rewritten to use "client_ext"</entry>
592                                                         </row>
593                                                         <row>
594                                                                 <entry>generic-client</entry>
595                                                                 <entry>Prerequisite "client_app"; makes an XPI file suitable for use with "xulrunner --install-app""</entry>
596                                                         </row>
597                                                         <row>
598                                                                 <entry>win-xulrunner</entry>
599                                                                 <entry>Prerequisite "client_app"; adds Windows xulrunner to client build</entry>
600                                                         </row>
601                                                         <row>
602                                                                 <entry>linux-xulrunner</entry>
603                                                                 <entry>Prerequisite "client_app"; adds Linux xulrunner to client build</entry>
604                                                         </row>
605                                                         <row>
606                                                                 <entry>win-client</entry>
607                                                                 <entry>Prerequisite "win-xulrunner"; builds "setup exe" (requires that "nsis" package be installed, will add options for automatic update if configured and developer options if client build was a "make devbuild")</entry>
608                                                         </row>
609                                                         <row>
610                                                                 <entry>linux-client</entry>
611                                                                 <entry>Prerequisite "linux_xulrunner"; builds a "tar.bz2" bundle of the Linux client</entry>
612                                                         </row>
613                                                         <row>
614                                                                 <entry>[generic-|win-|linux-|extension-]updates[-client]</entry>
615                                                                 <entry>Calls external/ to build full and partial updates generic/win/linux/extension prefix limit to that distribution; Adding "-client" builds clients and copies them to a subdirectory of the "updates" directory as well; "extension-updates-client" doesn't exist.</entry>
616                                                         </row>
617                                                 </tbody>
618                                         </tgroup>
619                                 </table>
620                                 <para>Descriptions of other special build options follow:</para>
621                                 <itemizedlist>
622                                         <listitem>
623                                                 <para>Developer Build</para>
624                                                 <para>You can create a so-called "developer build" of the Staff Client by substituting "devbuild" for "build" when running <emphasis>make</emphasis>. The build will contain an extra configuration file that enables some developer options.</para>
625                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, run <emphasis>make</emphasis> from the Staff Client source directory:</para>
626                                                 <figure>
627                                                         <title>Commands to do a "developer build"</title>
628                                                         <screen>
629                                                 $ su - opensrf
630                                                 $ cd /home/opensrf/Evergreen-ILS-
631                                                 $ make devbuild
632                                                 ...
633                                                 </screen>
634                                                 </figure>
635                                         </listitem>
636                                         <listitem>
637                                                 <para>Compressed Javascript</para>
638                                                 <para>You can execute the Google "Closure Compiler" utility to automatically review and compress Javascript code after the build process completes, by substituting "compress-javascript" for "build" when running <emphasis>make</emphasis>. For more information see <ulink url="">Google "Closure Compiler"</ulink>.</para>
639                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, run the following commands from the Staff Client source directory:</para>
640                                                 <figure>
641                                                         <title>Commands to compress Javascript</title>
642                                                         <screen>
643                                                 $ su - opensrf
644                                                 $ cd /home/opensrf/Evergreen-ILS-
645                                                 $ make compress-javascript
646                                                 ...
647                                                 </screen>
648                                                 </figure>
649                                                 <para>You can also combine Javascript review and compression, and also perform a "developer build".</para>
650                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, run the following commands from the Staff Client source directory:</para>
651                                                 <figure>
652                                                         <title>Commands to compress Javascript and do a "developer build"</title>
653                                                         <screen>
654                                                 $ su - opensrf
655                                                 $ cd /home/opensrf/Evergreen-ILS-
657                                                 # order of options is important!
658                                                 $ make  devbuild  compress-javascript
659                                                 ...
660                                                 </screen>
661                                                 </figure>
662                                         </listitem>
663                                         <listitem>
664                                                 <para>Automatic Update Host</para>
665                                                 <para>The host used to check for automatic Staff Client updates can be overridden by specifying the AUTOUPDATE_HOST option. The following commands could have been used during the normal build process:</para>
666                                                 <figure>
667                                                         <title>Commands to set AUTOUPDATE_HOST for normal Evergreen build</title>
668                                                         <screen>
669                                                 $ su - root
670                                                 $ cd /home/opensrf/Evergreen-ILS-
671                                                 $ make AUTOUPDATE_HOST=localhost install
672                                                 ...
673                                                 </screen>
674                                                 </figure>
675                                                 <para>You can manually set AUTOUPDATE_HOST to set up automatic update checking. The following commands will manually build the Staff Client using a different AUTOUPDATE_HOST.</para>
676                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:</para>
677                                                 <figure>
678                                                         <title>Commands to manually specify AUTOUPDATE_HOST</title>
679                                                         <screen>
680                                                 $ su - opensrf
681                                                 $ cd /home/opensrf/Evergreen-ILS-
682                                                 $ make AUTOUPDATE_HOST=localhost build
683                                                 ...
684                                                 </screen>
685                                                 </figure>
686                                                 <para>For more information on Automatic Updates, see the section <xref linkend="serversideinstallation-staffclient-autoupdate"/>.</para>
687                                         </listitem>
688                                 </itemizedlist>
689                         </section>
690                         <section>
691                                 <title>Installing and Activating a Manually Built Staff Client</title>
692                                 <para>The Staff Client is automatically built, installed and activated as part of the normal <emphasis>make install</emphasis> process for Evergreen server-side software. However, if you manually build the Staff Client, then you need to take additional steps to properly install and activate it. You also have the option of installing the Staff Client on the same machine it was built on, or on a different machine.</para>
693                                 <para>Assuming you have already built the Staff Client, and that your installation is in the directory <emphasis>/openils/var/web/xul</emphasis>, as the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
694                                 <figure>
695                                         <title>Commands to install the Staff Client on the same machine</title>
696                                         <screen>
697                                 $ su - opensrf
698                                 $ cd /home/opensrf/Evergreen-ILS-
699                                 $ mkdir -p "/openils/var/web/xul/$(cat build/BUILD_ID)"
700                                 $ cp -R build/server "/openils/var/web/xul/$(cat build/BUILD_ID)"
701                                 </screen>
702                                 </figure>
703                         </section>
704                         <section>
705                                 <title>Packaging the Staff Client</title>
706                                 <para>Once the Staff Client has been built, you can create several forms of client packages by using some targetted <emphasis>make</emphasis> commands in the Staff Client source directory.</para>
707                                 <itemizedlist>
708                                         <listitem>
709                                                 <para>Packaging a Generic Client</para>
710                                                 <para>This build creates a Staff Client packaged as an XPI file to use with <emphasis>XULRunner</emphasis>. It requires that you already have the "zip" utility installed on your system. It will create the output file "evergreen_staff_client.xpi", suitable for use with the <emphasis>XULRunner</emphasis> parameter <emphasis>--install-app</emphasis>.</para>
711                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
712                                                 <figure>
713                                                         <title>Commands to package a "generic" client</title>
714                                                         <screen>
715                                                 $ su - opensrf
716                                                 $ cd /home/opensrf/Evergreen-ILS-
717                                                 $ make generic-client
718                                                 ...
719                                                 </screen>
720                                                 </figure>
721                                         </listitem>
722                                         <listitem>
723                                                 <para>Packaging a Windows Client</para>
724                                                 <para>This build creates a Staff Client packaged as a Windows executable. It requires that you already have the "unzip" utility installed on your system. It also requires that you install <ulink url="">NSIS (Nullsoft Scriptable Install System)</ulink>, a professional open source utility package used to create Windows installers (the "makensis" utility is installed as part of the "nsis" package). We recommend using Version 2.45 or later. This build will create the output file "evergreen_staff_client_setup.exe".</para>
725                                                 <para>(OPTIONAL) If you wish for the Staff Client to have a link icon/tray icon by default, you may wish to provide a pre-modified <emphasis>xulrunner-stub.exe</emphasis>. Place it in the Staff Client source directory and <emphasis>make</emphasis> will automatically use it instead of the one that comes with the downloaded <emphasis>XULRunner</emphasis> release. The version of <emphasis>xulrunner-stub.exe</emphasis> need not match exactly.</para>
726                                                 <para>(OPTIONAL) You can also use a tool such as <ulink url="">Resource Hacker</ulink> to embed icons. "Resource Hacker" is an open-source utility used to view, modify, rename, add, delete and extract resources in 32bit Windows executables. See the following table for some useful icon ID strings:</para>
727                                                 <table>
728                                                         <title>Useful icon ID strings</title>
729                                                         <tgroup align="left" cols="2" colsep="1" rowsep="1">
730                                                                 <colspec colnum="1" colwidth="1*"/>
731                                                                 <colspec colnum="2" colwidth="1*"/>
732                                                                 <tbody>
733                                                                         <row>
734                                                                                 <entry>IDI_APPICON</entry>
735                                                                                 <entry>Tray icon</entry>
736                                                                         </row>
737                                                                         <row>
738                                                                                 <entry>32512</entry>
739                                                                                 <entry>Default window icon</entry>
740                                                                         </row>
741                                                                 </tbody>
742                                                         </tgroup>
743                                                 </table>
744                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
745                                                 <figure>
746                                                         <title>Commands to build a Windows client</title>
747                                                         <screen>
748                                                 $ su - opensrf
749                                                 $ cd /home/opensrf/Evergreen-ILS-
750                                                 $ make win-client
751                                                 ...
752                                                 </screen>
753                                                 </figure>
754                                         </listitem>
755                                         <listitem>
756                                                 <para>Packaging a Linux Client</para>
757                                                 <para>This build creates a Staff Client package for Linux as a "tar.bz2" file with <emphasis>XULRunner</emphasis> already bundled with it. It creates the output file "evergreen_staff_client.tar.bz2".</para>
758                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
759                                                 <figure>
760                                                         <title>Commands to build a Linux client</title>
761                                                         <screen>
762                                                 $ su - opensrf
763                                                 $ cd /home/opensrf/Evergreen-ILS-
764                                                 $ make linux-client
765                                                 ...
766                                                 </screen>
767                                                 </figure>
768                                         </listitem>
769                                         <listitem>
770                                                 <para>Packaging a Firefox Extension</para>
771                                                 <para>This build requires that you already have the "zip" utility installed on your system. It creates a Staff Client packaged as a Firefox extension and creates the output file "evergreen.xpi".</para>
772                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
773                                                 <figure>
774                                                         <title>Commands to build a Firefox extension</title>
775                                                         <screen>
776                                                 $ su - opensrf
777                                                 $ cd /home/opensrf/Evergreen-ILS-
778                                                 $ make extension
779                                                 ...
780                                                 </screen>
781                                                 </figure>
782                                         </listitem>
783                                 </itemizedlist>
784                         </section>
785                         <section xml:id="serversideinstallation-staffclient-autoupdate">
786                                 <title>Staff Client Automatic Updates</title>
787                                 <para>It is possible to set up support for automatic Staff Client updates, either during the normal Evergreen server-side build process, or by manually building the Staff Client with certain special options.</para>
788                                 <section>
789                                         <title>WARNINGS</title>
790                                         <para>Automatic update server certificate requirements are more strict than normal server requirements. Firefox and <emphasis>XULRunner</emphasis> will both ignore any automatic update server that is not validated by a trusted certificate authority. Servers with exceptions added to force the Staff Client to accept them <emphasis>WILL NOT WORK</emphasis>.</para>
791                                         <para>In addition, automatic updates have special requirements for the file <emphasis>update.rdf</emphasis>:</para>
792                                         <orderedlist>
793                                                 <listitem>It must be served from an SSL server, or</listitem>
794                                                 <listitem>It must be signed with the <ulink url="">McCoy</ulink> tool.</listitem>
795                                         </orderedlist>
796                                         <para>You can pre-install the signing key into the file <emphasis>install.rdf</emphasis> directly, or install it into a copy as <emphasis>install.mccoy.rdf</emphasis>. If the latter exists it will be copied into the build instead of the original file <emphasis>install.rdf</emphasis>.</para>
797                                 </section>
798                                 <section>
799                                         <title>Autoupdate Host</title>
800                                         <para>The name of the automatic update host can be provided in either of two ways:</para>
801                                         <orderedlist>
802                                                 <listitem>At configuration time for the normal build of the Evergreen server-side software, or</listitem>
803                                                 <listitem>During a manual Staff Client build process.</listitem>
804                                         </orderedlist>
805                                         <para/>
806                                         <itemizedlist>
807                                                 <listitem>
808                                                         <para>At configuration time for the normal build of Evergreen server-side software</para>
809                                                         <para>This must be done when the Evergreen server-side software is first configured (see the section <xref linkend="serversideinstallation-configure"/>). As the <emphasis role="bold">opensrf</emphasis> user, use the utility "configure" as shown:</para>
810                                                         <figure>
811                                                                 <title>Commands to configure Evergreen</title>
812                                                                 <screen>
813                                                         $ su - opensrf
814                                                         $ cd /home/opensrf/Evergreen-ILS-
815                                                         $ ./configure --prefix=/openils --sysconfdir=/openils/conf --with-updateshost=hostname
816                                                         $ make
817                                                         ...
818                                                         </screen>
819                                                         </figure>
820                                                 </listitem>
821                                                 <listitem>
822                                                         <para>During a manual Staff Client build process</para>
823                                                         <para>You will used the variable AUTOUPDATE_HOST=hostname (see above). If you specify just a hostname (such as "") then the URL will be a secure URL (such as "". If you wish to use a non-HTTPS URL then prefix the hostname with "http://" (such as "").</para>
824                                                         <para>If neither option is used then, by default, the Staff Client will not include the automatic update preferences.</para>
825                                                 </listitem>
826                                         </itemizedlist>
827                                 </section>
828                                 <section>
829                                         <title>Building Updates</title>
830                                         <para>Similar to building clients, the targets "generic-updates", "win-updates", "linux-updates", and "extension-updates" can be used individually with <emphasis>make</emphasis> to build the update files for the Staff Client. To build all the targets at once, simply use the target "updates".</para>
831                                         <para>A "full" update will be built for each specified target (or for all if you use the target "updates"). For all but extensions any previous "full" updates (archived by default in the directory <emphasis>/openils/var/updates/archives</emphasis>) will be used to make "partial" updates. Partial updates tend to be much smaller and will thus download more quickly, but if something goes wrong with a partial update the full update will be used as a fallback. Extensions do not currently support partial updates.</para>
832                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
833                                         <figure>
834                                                 <title>Commands for building updates</title>
835                                                 <screen>
836                                         $ su - opensrf
837                                         $ cd /home/opensrf/Evergreen-ILS-
839                                         # command to build all updates at once:
840                                         $ make updates
841                                         ...
843                                         # commands to build updates individually:
844                                         $ make generic-updates
845                                         ...
846                                         $ make win-updates
847                                         ...
848                                         $ make linux-updates
849                                         ...
850                                         $ make extension-updates
851                                         ...
852                                         </screen>
853                                         </figure>
854                                 </section>
855                                 <section>
856                                         <title>Building updates with clients</title>
857                                         <para>To save time and effort you can build updates and manual download clients at the same time by adding the string "-client" to each target name. For instance, you can specify "win-updates-client". You can also specify "updates-client" to build all the targets at once. This does not work for extension-updates.</para>
858                                         <para>The clients will be installed alongside the updates and listed on the "manualupdate.html" page, rather than left in the Staff Client directory.</para>
859                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
860                                         <figure>
861                                                 <title>Commands for building updates</title>
862                                                 <screen>
863                                         $ su - opensrf
864                                         $ cd /home/opensrf/Evergreen-ILS-
866                                         # command to build all updates at once:
867                                         $ make updates-client
868                                         ...
870                                         # commands to build updates individually:
871                                         $ make generic-updates-client
872                                         ...
873                                         $ make win-updates-client
874                                         ...
875                                         $ make linux-updates-client
876                                         ...
877                                         </screen>
878                                         </figure>
879                                 </section>
880                                 <section>
881                                         <title>Activating the Update Server</title>
882                                         <para>This section reviews scripts associated with the update server, and requires some final adjustments to file permissions.</para>
883                                         <para>The Apache example configuration creates an "updates" directory that, by default, points to the directory <emphasis>/openils/var/updates/pub</emphasis>. This directory contains one HTML file and several specially-named script files.</para>
884                                         <para>The "updatedetails.html" file is the fallback web page for the update details. The "check" script is used for <emphasis>XULRunner</emphasis> updates. The "update.rdf" script is used for extension updates. The "manualupdate.html" script checks for clients to provide download links when automatic updates have failed and uses the download script to force a download of the generic client XPI (compared to Firefox trying to install it as an extension).</para>
885                                         <para>The following scripts should be marked as executable: <emphasis>check, download, manualupdate.html, update.rdf</emphasis>. As the <emphasis role="bold">root</emphasis> user, change directory to the updates directory, then execute the following commands:</para>
886                                         <figure>
887                                                 <title>Changing file permissions of scripts</title>
888                                                 <screen>
889                                         $ su - root
890                                         $ cd /openils/var/updates/pub
891                                         $ chmod +x  check  download  manualupdate.html  update.rdf
892                                         </screen>
893                                         </figure>
894                                 </section>
895                         </section>
896                         <section>
897                                 <title>Other tips</title>
898                                 <section>
899                                         <title>Multiple workstations on one install</title>
900                                         <para>Multiple workstation registrations for the same server can be accomplished with a single Staff Client install by using multiple profiles. When running <emphasis>XULRunner</emphasis> you can specify the option "-profilemanager" or "-P" (uppercase "P") to force the Profile Manager to start. Unchecking the "Don't ask at startup" option will make this the default.</para>
901                                         <para>Once you have opened the Profile Manager you can create additional profiles, one for each workstation you wish to register. You may need to install SSL exceptions for each profile.</para>
902                                         <para>When building targets "win-client", "win-updates-client", or "updates-client", you can specify "NSIS_EXTRAOPTS=-DPROFILES" to add an "Evergreen Staff Client Profile Manager" option to the start menu.</para>
903                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, change directory to the Staff Client source directory, then execute the following commands:</para>
904                                         <figure>
905                                                 <title>Command to add start menu option</title>
906                                                 <screen>
907                                         $ su - opensrf
908                                         $ cd /home/opensrf/Evergreen-ILS-
909                                         $ make NSIS_EXTRAOPTS=-DPROFILES win-client
910                                         ...
911                                         </screen>
912                                         </figure>
913                                 </section>
914                                 <section>
915                                         <title> Multiple Staff Clients</title>
916                                         <para>This may be confusing if you are not careful, but you can log in to multiple Evergreen servers at the same time, or a single Evergreen server multiple times. In either case you will need to create an additional profile for each additional server or workstation you want to log in as (see previous tip).</para>
917                                         <para>Once you have created the profiles, run <emphasis>XULRunner</emphasis> with the option "-no-remote" (in addition to "-profilemanger" or "-P" if neeeded). Instead of <emphasis>XULRunner</emphasis> opening a new login window on your existing session it will start a new session instead, which can then be logged in to a different server or workstation ID.</para>
918                                 </section>
919                         </section>
920                 </simplesect>
921         </section>
922         <section xml:id="serversideinstallation-running-staffclient">
923                 <title>Running the Staff Client</title>
924                 <para>Run the Staff Client on a Linux system by using the application <emphasis>XULRunner</emphasis> (installed automatically and by default with Firefox version 3.0 and later on Ubuntu and Debian distributions).</para>
925                 <para>For example, if the source files for the Evergreen installation are in the directory <emphasis>/home/opensrf/Evergreen-ILS-</emphasis>, start the Staff Client as shown in the following command example:</para>
926                 <figure>
927                         <title>Commands to run the Staff Client</title>
928                         <screen>
929                         $ su - opensrf
930                         $ xulrunner /home/opensrf/Evergreen-ILS-
931                         </screen>
932                 </figure>
933         </section>
934         <section xml:id="serversideinstallation-proxy">
935                 <title>Configuring a Proxy for the Staff Client</title>
936                 <simplesect>
937                         <title>Why Use a Proxy for the Staff Client?</title>
938                         <para>There are several reasons for sending network traffic for the Staff Client through an SSH proxy:</para>
939                         <itemizedlist>
940                                 <listitem>
941                                         <para><emphasis role="bold">Firewalls</emphasis> may prevent you from reaching the server. This may happen when you are connecting the Staff Client to a test server that should not be available generally, or it may be the result of network design priorities other than ease of use.</para>
942                                 </listitem>
943                                 <listitem>
944                                         <para>You may wish to <emphasis role="bold">improve security</emphasis> where Staff Client traffic may be susceptible to network eavesdropping. This is especially true when wireless is otherwise the best option for connecting a staff machine to the network.</para>
945                                 </listitem>
946                         </itemizedlist>
947                 </simplesect>
948                 <simplesect>
949                         <title>Setting Up an SSH Tunnel</title>
950                         <para>You will need a server that allows you to log in via SSH and has network access to the Evergreen server you want to reach. You will use your username and password for that SSH server to set up a tunnel.</para>
951                         <para>For Windows users, one good solution is the open-source utility <ulink url="">PuTTY</ulink>, a free telnet/SSH client]]. When setting up a PuTTY session:</para>
952                         <figure>
953                                 <title>Setting up an SSH tunnel in PuTTY</title>
954                                 <mediaobject>
955                                         <imageobject>
956                                                 <imagedata fileref="../media/serversideinstallation-proxy-putty.png" scalefit="1" width="70%"/>
957                                         </imageobject>
958                                 </mediaobject>
959                         </figure>
960                         <orderedlist>
961                                 <listitem>Use the menu on the left to go to Connection > SSH > Tunnels.</listitem>
962                                 <listitem>Enter ''9999'' in the "Source port".</listitem>
963                                 <listitem>Choose "Dynamic". Do not enter anything in the Destination text entry box.</listitem>
964                                 <listitem>Click the "Add" button. "D9999" will now appear in the "Forwarded ports" list.</listitem>
965                                 <listitem>Use the menu on the left to go back to "Session", and enter the host name of the SSH server.</listitem>
966                                 <listitem>A window will open up so that you can enter your username and password. Once you are logged in, the tunnel is open.</listitem>
967                         </orderedlist>
968                 </simplesect>
969                 <simplesect>
970                         <title>Configuring the Staff Client to Use the SSH Tunnel</title>
971                         <para>In order to tell the Staff Client that all traffic should be sent through the SSH tunnel just configured, you must edit the file <emphasis>C:\Program Files\Evergreen Staff Client\greprefs\all.js</emphasis>. Search this file for the word <emphasis role="bold">socks</emphasis> to find the appropriate section for the following changes.</para>
972                         <figure>
973                                 <title>The SOCKS section of "all.js" before changes</title>
974                                 <mediaobject>
975                                         <imageobject>
976                                                 <imagedata fileref="../media/serversideinstallation-proxy-socks-1.png" scalefit="1" width="70%"/>
977                                         </imageobject>
978                                 </mediaobject>
979                         </figure>
980                         <para>Make the following changes:</para>
981                         <itemizedlist>
982                                 <listitem>Change the value of <emphasis>network.proxy.socks</emphasis>  from <emphasis role="bold">""</emphasis> to <emphasis role="bold">"localhost"</emphasis>.</listitem>
983                                 <listitem>Change the value of <emphasis>network.proxy.socks_port</emphasis> from <emphasis role="bold">"0"</emphasis> to <emphasis role="bold">9999</emphasis>.</listitem>
984                         </itemizedlist>
985                         <figure xml:id="serversideinstallation-socks-figure">
986                                 <title>The SOCKS section of "all.js" after changes</title>
987                                 <mediaobject>
988                                         <imageobject>
989                                                 <imagedata fileref="../media/serversideinstallation-proxy-socks-2.png" scalefit="1" width="70%"/>
990                                         </imageobject>
991                                 </mediaobject>
992                         </figure>
993                         <para>If everything is working correctly, you should now be able to run the Staff Client and all its data will be sent encrypted through the SSH tunnel you have just configured.</para>
994                 </simplesect>
995         </section>
996 </chapter>