Release Name: 2.85

Release Date:

Released: Windows, GNU/Linux, Mac OS/X and Source distributions of Greenstone v2.85

Installation Instructions

  • Important Note: If you have Greenstone 2.83 installed, and it is installed into a pre-existing folder with no Greenstone subfolder (eg installed directly into My Documents), DO NOT run the uninstaller, as it will delete all the files in that folder. You'll need to manually delete all the Greenstone folders and files.

Binary distribution

Upon downloading the installer, run the executable: On Windows and Mac you need to double-click it to launch the installation dialog, on Linux you first need to set the downloaded executable's permissions to executable before you can run it from the terminal.

It may take some time for the Greenstone installation dialog to appear. Once the installation dialog displays, you generally need to keep pressing the Next button until it is finished. However, when it asks for the location to install Greenstone in, make sure to choose a location on your file system for which you have access privileges. If you want to install Greenstone into C:\Program Files on Windows 7 or Windows Vista you will need to run the installer with administrator permissions (this can be achieved by right clicking on the installer and choosing "Run as administrator"). And if you wish to use the Greenstone Administration pages (which will be needed if you want to create user accounts for a Remote Greenstone server), then now is a good time to set a sensible password for that.

  • The installer initially unpacks into a temporary directory (/tmp on linux). Set the TMPDIR environment variable to change this.
  • The windows version can be installed anywhere, including paths with spaces and brackets (these caused a problem in previous releases).
  • The Linux and Mac versions must be installed into a path with *no* spaces.

When the installation process is finished, you can run the Greenstone Server or the Greenstone Librarian Interface (GLI):

1. On Windows, the included Greenstone Server can be launched from the shortcut in the Start menu. On Mac and Linux, use a terminal (in Macs this is found under Applications > Utilities > Terminal) to go into the Greenstone installation directory and run


The small Greenstone Server Interface (GSI) dialog will display. Pressing its Enter Library button will open a browser onto your Greenstone Digital Library home page.(*)

By default, the web servers restrict access to Greenstone pages to the local machine. To change this, go to File > Settings in the Greenstone Server Interface dialog, and tick "Allow external connections". Click OK to save the settings, then press the Restart Library button. (**)

Note: The Windows version of Greenstone includes two server applications: server.exe and an apache web server. (Linux and Mac versions of Greenstone include only the apache web server). By default, the server.exe application is launched when you use the Windows Start menu shortcut to launch the server. To use the apache web server included with the Windows version of Greenstone, do one of the following:

  • Rename the server.exe executable found in your Greenstone installation folder. Then the Start menu shortcut will run the Apache web server instead of server.exe. If you are using GLI, GLI will then also start up Apache instead of server.exe. Alternatively you can start the web server by running gs2-server.bat (located in your Greenstone installation folder).
  • Run gs2-web-server.bat - this will start the Apache web server, but won't affect the Start menu shortcut, or GLI's behaviour.

2. The Greenstone Librarian Interface (GLI) can be run from the Windows Start menu. On Mac and Linux, use a terminal to go into the Greenstone installation directory and run


First, as in (1) above, the Greenstone Server Interface (GSI) dialog will appear. Eventually the Greenstone Librarian Interface (GLI) dialog will appear. Refer to the Greenstone 2.85 tutorials for examples of using the GLI to create collections of documents. Once you have finished creating a collection, you can preview it by pressing the Preview button from GLI's Create tab. It will open your Greenstone collection in the web browser.(*) (**)

(*) If the web page displays a "Forbidden" message instead, go back to the GSI dialog, and use its File > Settings menu to change the Address Resolution method to one of the other options there. Then press the Restart Library Button in the main GSI dialog and see whether the browser page it opens now is the Greenstone home page. Otherwise try another Address Resolution option from the GSI dialog's Settings menu and see whether the pages are visible now.

(**) If you have your own external web server that you wish to use, then in your Greenstone installation directory, rename the folder apache-httpd to something else. Alternatively, you can rename the file (if on Linux/Mac) or gs2-server.bat (if on Windows) to something else.

3. The Client-GLI is the version of the Greenstone Librarian Interface that can be run on a machine different to the one that is running the Greenstone server. To be able to run the Client-GLI application, you will need Sun Java 1.5.0 or greater installed and you will need to have:

  • Java's bin folder on your PATH
  • JAVA_HOME set to point to your Java installation folder

If you follow Java's installation instructions, they will direct you on how to add the Java installation's bin folder to your system's PATH environment variable and how to set the JAVA_HOME environment variable.

If on Windows, you can run client-GLI from its shortcut in the Start Menu. On Linux and Mac systems, you would use a terminal to go into your Greenstone installation folder and then run


When the client-GLI starts up, a small dialog appears asking you to enter the URL of the remote Greenstone server's file. This URL generally has the form: http://<host>:<port>/greenstone/cgi-bin/, where you have to fill in the host and port values for the remote Greenstone server. After clicking OK, the client-GLI application window will appear. Client-GLI looks and works just like the GLI, except that most of the document processing takes place on the remote machine where the Greenstone server is running.

Source Components and Source Distributions

There are two ways to get Greenstone 2.85's source code in a compressed format (zip or tar.gz file):

1. If you didn't install a Greenstone binary version, you would get the Greenstone Source Distribution which contains the (uncompiled) source code.

2. If you have downloaded and installed the Greenstone binary version already, you would only need to top up your installation with the source code by getting the Source Component. You would then extract this in your Greenstone directory:

  • On Windows, right-clicking on the zip file and choosing to extract its contents to this location should be sufficient. Allow windows to merge extracted folders with existing ones.
  • To extract to the correct location on Linux and Mac systems, you would need to use a Terminal to run tar -xvzf Greenstone-2.85-source-component.tar.gz from your Greenstone installation directory. Then all the tar.gz file's contents will end up inside the appropriate folders.

To compile the Greenstone source code, you need an appropriate compiler:

  • XCode for Macs,
  • the GNU compiler for Linux
  • Visual C++ (Visual Studio) and Microsoft/Windows Platform SDK for Windows machines.

If you have gnome-lib (if not, see 2 paragraphs below), then to configure and compile on Mac and Linux machines, open a Terminal and run the following three commands from the Greenstone installation directory (each of them will take some time):

./configure --enable-apache-httpd
make install

If you do not wish to compile up the included apache web server, leave the –enable-apache-httpd out of step 1. (See also the section "Additonal notes to compiling manually" below.)

Note: If you don't have the correct gnome-lib, then the compilation will fail with error messages about WVware. In that case, visit which contains archived versions of gnome-lib for various operating systems. Download the one for your operating system that contains mimimal in its label, and extract its contents into your Greenstone installation's ext folder (after deleting any gnome-lib folder already inside the ext folder). Use a command terminal to go into the extracted gnome-lib folder and run

source devel.bash

Then go back to the Greenstone installation directory and run the configure and compile commands (above) once more.

To compile on Windows,

1. Edit the start of the makegs2.bat file in your Greenstone installation directory to contain the path to your Visual Studio's vcvars32.bat file (or vsvars32.bat file for later versions), this file is typically located in a place like C:\Program Files\Microsoft Visual Studio 10.0\VC\bin.

2. Then run the makegs2.bat file from the DOS prompt. Type Y to extract the necessary files. When it asks you what you want to compile, either type 3 to compile up the server.exe web server, or type 4 to compile up the apache web server included with Greenstone.

Running the installer in text-only mode

  1. Give the binary of the installer execute permissions
  2. Then run it by passing in the text-only flag. (Worked with GS2.85 on 19 Nov 2012)
  3. Follow the instructions on the screen thereafter. If you mistype at any stage, press ctrl-C to start again.
> ./Greenstone-2.85-candidate-2012.11.19-linux text-only
Extracting java installer...

Extraction Complete
You can now run "java -jar greenstone.jar text" to run the installer from the command line

Setting the Preview Command in GLI

If you've installed Greenstone and are running GLI (the Greenstone Librarian Interface application) for the first time, and have just finished builing your first collection with it, GLI may not know what to do when you press the Preview Button. If it complains or does nothing when you press the Preview Button, you will need to tell it how to launch your default browser (and tell it to open on the collection page) upon pressing Preview.

The following specifies the commands you are likely to need. Paste the applicable one into GLI's File > Preferences menu > Connection tab > Preview Command field.

  • On Windows:
cmd.exe /c start "" "%1"
  • On Mac:
open %1

Put %1 in quotes if your Greenstone installation path contains spaces.

  • On Linux systems:
firefox %1

If you work with another browser, then type the command you'd use to launch that from the terminal, suffixed with %1 once again. (Embed %1 in quotes if you've installed Greenstone in a path containing spaces.) NOTE: If GLI's Preview Button does not succeed in launching the browser with the collection URL, consult this page of the FAQ for a suggested solution.


On Windows, the uninstaller is accessible from the Start menu.

For most people under Linux systems, a Greenstone installation can be removed with the usual rm command. However, by using this method, any collections you've created will also be deleted. If you're on Linux or Mac and wish to uninstall Greenstone, the recommended way to do so is by using the Uninstaller, as this will give you the option to retain your collections. To launch the Uninstaller, you can either run "bash" from the uninstall folder, or will first need to give execute permissions to the uninstall/ file in your Greenstone installation before you can run it:

cd uninstall
chmod u+rx

Important Changes

  • The included apache web server doesn't randomly jump to another port anymore. There is also the option to make the server merely warn you when a selected port is already in use, instead of letting it try for another port.
  • There have been several bugfixes concerning Unicode characters in metadata. Especially to browsing classifiers like List, HFileHierarchy and Plugins like PagedImagePlugin and MetadataCSVPlugin.
  • Better handling of spaces in the Greenstone installation file path on Windows.
  • Fixes to subtle but serious bugs like sudden server crashes, such as when swapping between indexers after having once used MG.
  • Linux and Mac library conflicts to do with wvware and imagemagick have been resolved: the libraries no longer interfere with Greenstone's own environment (so that Linux windowing still works when launching external applications from within Greenstone).
  • Now you can relocate your Greenstone installation and run a script after that to ensure that the included Apache web server still works: <br/>Upon moving your Greenstone installation folder around, use a terminal to go into the new Greenstone installation location. Then run the following if you're on Linux or Mac:<br/>
    ./ reset-gsdlhome

    <br/>Run the following if you're on a Windows machine:<br/>

    gsicontrol.bat reset-gsdlhome
  • PDFPlugin's use_sections option is now also available for when you're using the PDFBox extension for Greenstone.
  • On Windows XP and onwards, if you have Microsoft Office 2007+or Microsoft Word 2007+ installed, you can turn on windows_scripting in the WordPlugin and Greenstone will use your Word Application's inbuilt abilities to convert docx files to html. This means that, for such situations, you will not need to install OpenOffice.
  • Further bugfixes regarding the Greenstone extensions for OpenOffice and PDFBox (e.g. correctly calculates the number pages in the PDF to display as metadata).
  • In Greenstone 2.84, on the Local Library Server included for Windows (server.exe) had a bug that prevented authentication and people were advised to resort to using the included Apache web server to work with the admin pages. This has been resolved since 2.85 rc1.
  • The GLI applet is back to working again and a bug in the Depositor when run on Windows has been fixed too. Basing a collection on an existing one when using GLI had developed a hiccup previously, which has been fixed.
  • The database has been slightly altered. (A metadata previously called srclink_file now has a new name for the same: srclinkFile. If you come across any source icons not linking to their source documents when previewing collections built with previous versions of Greenstone, then see the section Migrating collections from 2.84 to 2.85 on how to convert collections from 2.84 to 2.85.)
  • glisite.cfg and llssite.cfg have been merged into the latter, but with separate property names for those properties that need to remain distinct between when the server is launched by GLI and when the server is launched by itself.
  • The new EmbeddedMetadataPlugin required additional changes to how other metadata-related plugins in the pipeline functioned and to the internal handling of the greenstone "ex." prefix.
  • Plugins: More efficient file reads by Plugins. PDFPlugin automatically extract Title, Author, Subject and Keywords metadata fields and store them as ex.Metadata.
  • Improved way of locating perl.

OAI Server

  • Greenstone 2 has been updated to once more pass the offical OAI-server validation tests.

Overview of changes in 2.85

This section contributed by John Rose.

Some of the new Greenstone features which facilitate the creation of institutional repositories and other open access collections:

1. OAI server

Your collections can easily be made available for remote harvesting using OAI-PMH protocol, which works silently in parallel with normal web access to the collections. All that you have to do is to add a bit of configuration data in the oai.cfg text file in the etc subdirectory under the Greenstone home directory. The data to specify is explained in comment lines in the above file. If the collections to be made available through OAI-PMH do not all use Dublin Core metadata or one of the two other standard OAI metadata sets, the oai.cfg file will need to contain mapping data to translate your metadata into one of the Greenstone OAI-PMH metadata sets (also explained in the comments to the oai.cfg file).

OAI-PMH support has been provided for some time by Greenstone, but there have previously been a few functional gaps, as well as a bug in version in 2.84. In version 2.85, all official OAI-PMH validation criteria have been tested and satisfied; you will be able to validate your own OAI-PMH server using instructions given in the release notes. If you don't specify the urls for the associated documents in the metadata, the system can automatically generate internal urls so that users can access the full documents from the harvested OAI records. You will also now be able to harvest OAI-PMH records and the associated documents residing in external Greenstone collections (in 2.84, harvesting worked to access information in non-Greenstone collections, but there was problem in harvesting from other Greenstone collections).

Much information is put up on the web without clear specification of the concerned intellectual property rights. Although this is not good practice in general, when activating the OAI server special care should be taken to ensure that your documents are really available under open access conditions (in the public domain or freely distributable and re-distributable under an open access license such as Creative Commons). Greenstone can only take care of the technical access - for legal and organisational considerations, prospective open access providers may consult, for example, the resource links of the EIFL Open Access programme (

Once your OAI server is operational, to provide maximal international visibility for your open access collections you should register them in at least one (and ideally all) of the following: the ROAR directory (, the OAI directory ( and the OpenDOAR directory ( It would also be very nice if you could confirm to this list that your server is operational, providing the url base address.

2. PDF metadata

Prior to version 2.83, reliable import of, and metadata extraction from, pdf files was limited to PDF versions 1.4 and earlier. Starting with 2.84 a new "PDF Box extension" has been available as a separate download to handle all PDF versions. This extension file need only be placed in the ext subdirectory of Greenstone for the improved PDF handling facilities to be operational (see the release notes). The PDF Box extension has been further improved in version 2.85, so be sure to download, unzip and insert an up-to-date PDF Box extension for this version, replacing the version of the file which you may have downloaded for version 2.84.

By using the PDF Box extension, you can extract any metadata entered in standard manner in a pdf file, i.e. the traditional pdf metadata (Author, Title, Subject, Keywords) and/or the newer XMP format metadata (including user defined fields). In general, we recommend that for users interested in extracting PDF metadata, it is better to use the PDF Box extension, even for pdf files in version 1.4 or earlier.

Using the PDF metadata extraction facility means that for PDF files generated by the users with metadata included (either directly with a tool like Acrobat, or by generating a PDF file from a package like Word which can transfer Word metadata to the generated PDF file), these metadata can be automatically incorporated into a Greenstone collection (without having to enter them in GLI or compile a metadata.xml file). This could clearly be of interest to open access applications, particularly when decentralized input is being submitted.ext subdirectory of Greenstone for the improved PDF handling facilities to be operational (see the release notes)

There is a catch: the metadata extraction procedure may not work flawlessly on recent version PDF files which are not "linearised" (called Fast Web View in Acrobat). So linearised PDF files should be used; the open source QPDF program ( claims to be able to linarise non-linearised PDF files, but this remains to be confirmed in so far as Greenstone treatment is concerned. Feedback from users on the PDF metadata extraction facility is most welcome.

3. Section handling for PDF files

For several years Greenstone has proposed a facility to automatically generate internal section (chapter) information from a Microsoft Office (e.g. Word), OpenOffice/Libreoffice or html document, but probably not for those PDF files which do not have a standard way of designating chapter/section headings. This automatic generation of internal section (chapter) information allows for table of contents display of the document and finer chapter-based searching.

Word files can be treated in this way if a compatible version of Word is installed in the computer in which a collection is built (see the tutorial at Word, Office Open XML or OpenDocument format files can also be treated without proprietary software if OpenOffice or LibreOffice is installed, by downloading the Greenstone OpenOffice extension into the ext subdirectory of the Greenstone installation (see the release notes), and activating the open office option in the Word (or Powerpoint, or Excel) plugin of Greenstone (similar to activating on Windows/Word scripting option as in the above mentioned tutorial).

An example collection has now been prepared to show how this can be extended to PDF files (see Included is an explanation of how to build the collection through the following steps: a. develop a Word version and a PDF version of the document (conversion of the Word version to PDF or vice-versa); b. make sure that the heading formats in Word are consistent with what you want for sections and subsections; c. import the Word file into Greenstone specifying the PDF file as an associated file; d. use the format statement guidance in the worked example to be able to search on the document subsections and also display the hit terms in the original PDF file (Word or OpenOffice/LibreOffice no longer needed after building - the collection could for example in the meantime have been transferred to a Linux server).

An alternative, more controllable but more labour intensive, method without recourse to word processing software would be to import the pdf file into Greenstone, right click in the Gather view and convert it to html, call an html editor and ensure that the section information is correctly introduced, add the pdf again but as an associated file (by setting the assoc-files parameter in HTMLPlugin), then build and display as per the worked example.

More complete documentation is being developed for all of the above techniques, and we will keep you informed on its progress.

4. Migrating to 2.85

To switch to version 2.85 from an earlier Greenstone version with minimal risks, you could i) back up your collections, ii) install 2.85 in a new home directory (to specified to the installer), and iii) copy the collect sub-directory from the old to the new version. If you are presently using a recent previous version of Greenstone (2.8x), the collections should be immediately available for use; if not, particularly for collections built under older versions of Greenstone, it should suffice to rebuild the collections under the new version. Any problems can be addressed to this list or the main Greenstone users list (

If you want to transfer information on users and user groups, the corresponding databases (users.gdb, key.gdb) should be copied from the etc sub-directory in the old collection to the new one. Of course if you have customised your previous version (main.cfg, style.css, macros, etc.), the old versions should also be copied to the new installation. When all is working perfectly, the old installation can be deleted.

Further Notes on Installation and Running

Apache HTTPD Notes

Greenstone binary releases come with the Apache HTTPD web server precompiled and installed by default into Greenstone/apache-httpd.

  • To uninstall it, delete the Greenstone/apache-httpd folder. To disable the use of it, rename the apache-httpd folder to something else (then you can rename it back if you change your mind later).
  • If you have an existing Apache web server installed and you want to set it up to serve your Greenstone, copy the appropriate bits out of Greenstone's Apache httpd.conf file into your existing Apache's httpd.conf file. Then disable (or uninstall) Greenstone's Apache as described above.
  • If you want to use an alternative webserver, then set it up appropriately, and disable the Greenstone Apache server.
  • If you had installed Apache Httpd previously for the sole purpose of serving Greenstone, then you may like to uninstall it and use the one installed by Greenstone.

Additional notes to compiling manually

On Windows, use a DOS prompt to go into your Greenstone installation folder. You will need Visual C++ (either from Visual Studio or the Express version) and you may also need the Windows/Microsoft Platform SDK installed. FIRST run the Platform SDK's SetEnv.Cmd (if you have it). THEN run Visual C++'s vcvars32.bat (or vsvars32.bat). Now you can compile manually:

  • To compile up server.exe, run the following commands (each takes several minutes)
nmake /f win32.mak
nmake /f win32.mak LOCAL_LIBRARY=1
  • If you only want to compile up the apache web server, type:
nmake /f win32.mak APACHE_HTTPD=1
  • If you wish to clean the files generated during compilation (both intermediate files and binaries), type:
nmake /f win32.mak clean
  • Note that if you wish to compile things up (or clean) for debugging, then in all the above commands you would append

On Linux and Mac, configuring and compiling generally takes the form:

make install
  • By default, Greenstone is compiled with accent folding turned on. To disable it, you would run the configure step as follows:
./configure --disable-accentfold

As stated in the installation instructions, to compile the included apache web server, the configure step needs to be:

./configure --enable-apache-httpd
  • You can get rid of the files generated by compilation by using a Terminal to go into your Greenstone installation folder and running:
make clean

To clean all the files generated during both compilation AND configuration (all config files, other intermediate files and binaries), you would run the following instead:

make distclean

Additional notes to running Greenstone on Windows

On Windows, running the Greenstone Librarian Interface (GLI) or the Greenstone Server Interface (GSI) manually from a DOS prompt could be useful in diagnosing anything that goes wrong, since it keeps any messages that were displayed during program execution visible in the DOS window.

To run GLI or GSI from the DOS prompt, first go into your Greenstone installation directory and then

  • to run the GSI, type:
  • to run GLI, type:
  • If you have trouble running gs2-server.bat (For example, getting the error "Could not find the main class: org.greenstone.server.Server2. Program will exit."), then you can run gsicontrol.bat instead. (See further below.)

Notes on using a Terminal or DOS prompt

On Macs, the Terminal is an application that can be found under Applications > Utilities > Terminal.

On Windows, you can start up a DOS prompt by going to Start > Run and then typing cmd.

To go to your Greenstone installation directory using your terminal, you would type:

cd <here you'd type the full path to your Greenstone installation folder>

On Windows you would use backslashes (\) in file paths, and on Linux and Mac you would use forward slashes (/).

On Linux and Mac, to run a shell script (Greenstone's shell scripts are files that end on *.sh or *.bash), you would precede the scriptname with a ./

On Windows, to run a batch script (files that end on *.bat), just type its name out in full.

E.g. on Windows:

cd C:\Greenstone

E.g. on Linux or Mac:

cd /home/me/greenstone

Using the gsicontrol script

The script is used by, and provides much functionality: you can use it to change port number, start and stop the Apache web server, etc. It accepts many parameters like:


You can use it as in the following example

  • In a command window, go to your Greenstone installation folder and run setup.bat (if on Windows) or 'source setup.bash' (for Linux/Mac)
  • Then run " set-port". It will ask for a port number. Use e.g. 8282 (just to avoid conflicts with standard ports).
  • Now run " web-start". (You would use the ".sh" extension on Linux and Mac machines and ".bat" on Windows machines.) Doing so will run the Apache web server.
  • In a browser, enter "http://localhost:8282". It should show the message "It works" indicating that Apache is running.
  • Then type "http://localhost:8282/greenstone/cgi-bin/library.cgi". It should show the Greenstone home page.
  • To stop the webserver at any point, from your command window run "./ web-stop" on linux/mac and "gsicontrol.bat web-stop" on windows.
  • If you move your Greenstone 2.85 installation folder to another location at any point, then (with the server still stopped), you would need to run "./ reset-gsdlhome" on Linux and "gsicontrol.bat reset-gsdlhome" on Windows.
  • If you forgot the admin password (as is required to access the Administration Pages and to use Remote GLI), this can be reset by running "./ configure-admin" on Linux and "gsicontrol.bat configure-admin" on Windows.

Notes on using GLI

In GLI's File > File Associations, you can set which applications are to be called to open files with different file extensions.

  • On Mac, you can type open %1 for all of these, which then lets the default application on the Mac open the file extension associated with each file. You may need to find the right command for you version of *Nix.
  • To do the same on Linux, type xdg-open %1 (or if you are specifically on a gnome system, then use gnome-open %1, while on a kde system you'd use kde-open %1).
  • To do the same on Windows, type cmd.exe /c start "" "%1".

Working with Remote Greenstone and the GLI-Client

These instructions are more Greenstone 2.85-specific than the general instructions for setting up Greenstone 2 as a remote server.

The following are steps to follow if you're on Windows. On Linux, you can skip steps 1 and 2, otherwise things are similar. For instance, you'll want to launch *.bash or *.sh script equivalents to the batch files listed. Also, you'll want to use forward slashes (/) instead of the Windows' backward slash (\) when specifying file paths.

1. If the path to your Greenstone installation contains any spaces (i.e. if any of the containing folders wherein your Greenstone is ultimately located contain spaces in their names), open cgi-bin/gsdlsite.cfg in a plain text editor and make sure that the value for the GSDLHOME line contains quotes around it. E.g.

gsdlhome "C:\Program Files\Greenstone2"

Save any changes.

2. Rename server.exe in your Greenstone installation folder to something else, say "_server.exe".

This is because you will need to use the included Apache web server for the remote Greenstone. By renaming the default library server in Greenstone 2, Greenstone will next look for the apache web server.

3. Now run the Apache web server included with your Greenstone from the Windows Start Menu, or by opening a DOS prompt and typing the path to your Greenstone 2 installation and then running the gs2-server script. E.g.

cd C:\Program Files\Greenstone2

Alternatively, you could use Windows Explorer to locate the gs2-server.bat file in your Greenstone2 installation folder and double click that file.

4. A dialog (the Greenstone Server Interface) will display. If you want remote clients accessing your Remote Greenstone Server, go to File > Settings of this dialog and tick "Allow External Connections" and choose either "Get local IP and resolve to a name" or "Get local IP". Finally, press the dialog's central Enter Library button.

It will open a browser and take you to a page like: http://localhost/greenstone/cgi-bin/library.cgi

OR: http://<YOUR-MACHINE-NAME:YOURPORT>/greenstone/cgi-bin/library.cgi (where if port were the default 80 it won't be displayed, e.g. http://<YOUR-MACHINE-NAME>/greenstone/cgi-bin/library.cgi)

5. Replace the "library.cgi" part of the URL in the browser with:

E.g. http://localhost/greenstone/cgi-bin/ (OR: http://<YOUR-MACHINE-NAME:YOURPORT>/greenstone/cgi-bin/

At the end of the browser page, it is imperative that it says something like:

"Installation OK!"

(If not check the error messages.)

6. You may need to give read and write access to the collect folder. Once again, open a DOS prompt. Type the following, or the equivalent of the following for your computer's locale, but make sure to type the path to *your* Greenstone2 installation (the example below uses C:\Program Files\Greenstone2\collect):

cacls "C:\Program Files\Greenstone2\collect" /P Everyone:F

On Linux you would do:

chmod -R a+rw /my/path/to/my/Greenstone2.85/collect

(If on Vista or Windows 7, you installed Greenstone in an Admin area, such as in Program Files, then you would need change the security settings of the collect directory: Right-click > Properties, then set the folder to "Everyone".)

7. Use the browser to go to your Greenstone home web page again.

  • Now click on the Administration Page link and add a new user:
  • Click the Add a New User link to the left
  • You'll be requested for the admin username (type "admin") and password, which will be what you chose upon installing Greenstone.

8. Enter the username and password for the new user.

  • In the Groups field, type "personal-collections-editor".
  • Press the Submit button.

9. You can connect to this server from the Client-GLI application included with any Greenstone installation. Either on the current machine or another machine (assuming you want the Greenstone server on one machine and the client on another), use the "Remote Librarian Interface (Client-GLI)" shortcut to launch Client-GLI. Alternatively, you can launch it from the command line, such as by opening a new DOS prompt, going to the gli folder of your Greenstone 2 installation, and running client-gli.bat. E.g.

cd C:\Program Files\Greenstone2\gli

10. A dialog will eventually appear asking you for the URL of the Remote Greenstone server's file.

  • If your client-gli is running from a different machine to where your Greenstone server is running, you need to specify the name of that remote machine hosting the Greenstone server: http://<YOUR-MACHINE-NAME:YOURPORT>/greenstone/cgi-bin/
  • If the client-gli is running on the same machine, you can generally type "localhost": http://localhost/greenstone/cgi-bin/

11. It will next ask you for a username and password. Type the values you entered for the new user you created in step 8.

12. The client-GLI dialog should finally open, and it will look and behave mostly the same as the usual (local) GLI.

Setting up your Greenstone OAI Server and using GLI to download over OAI from a Greenstone server

To get the Greenstone 2's OAI Server to work, edit the file etc/oai.cfg in your GS2 installation directory and provide values for the properties repositoryName and repositoryId. E.g.

repositoryName "Greenstone" 
repositoryId "greenstone"

In addition, you will need to edit the same etc/oai.cfg file to also list any collections you want served over OAI. Add such collections by name to the oaicollection property. For example, if you have a Greenstone collection called "oaipdf" and want it served over OAI, then you would append its name to the property oaicollection as follows:

oaicollection demo documented-examples/oai-e oaipdf

If you're validating your OAI server and wish to test the resumptionToken, also set the resumeafter property to be a much lower value. E.g.

resumeafter 5

For each collection meant to be served over OAI, edit the collection's etc/collect.cfg file by filling in necessary data. At a minimum, the email values for the creator and maintainer fields need to be set to something sensible if you want to validate your OAI server against an online validator:

creator <type your email here> 
maintainer <type your email here>

Moreover, if you wish to validate your OAI server against the OpenArchives validator, you will need to remove the default admin email (greenstone@…) in the creator and maintainer email fields from the collect/demo/etc/collect.cfg file. Check that the "greenstone@…" dummy email is not present in the collect.cfg file of any other demonstration collection that's listed in greenstone's oai.cfg file.

If you wish to validate your OAI server, visit

However, before you can validate your OAI server and before you can try testing if GLI can download over OAI from it, there are a few things you need to do to make your Greenstone OAI server accessible to the outside world:

  • If you're on windows, you will likely need to use the included Apache web server intead of the Local Library Server. To change over to using the Apache web server, change the file extension of server.exe which is found in the top-level your Greenstone installation (you can rename it to server.not for instance).
  • Your Greenstone server machine's firewall and virtual server (port-forwarding) settings may need to be set up such that the Greenstone server can be made accessible to the outside world. This is not something Greenstone can do, you will need to do this.
  • Once that's ready, you also need to tell the Greenstone server that it should make itself accessible to the outside world by turning on the "Allow External Connections" option in the File > Settings dialog of the Greenstone Server Interface application. In the same File > Settings dialog, choose the setting that allows the server to use the machine's hostname or host IP instead of "localhost".
  • Press the Enter library button in the Greenstone Server Interface, and it should open the browser on the home page of your digital library. You will see a URL like:

Change it to


Note that you want the full hostname including domain. This is the URL you will want to feed into the OAI Validator at If the URL is not accepted for some reason, try pasting it in a new browser window, and suffix "?verb=Identify" to it, to see what the OAI validator gets to see:


For further information on your Greenstone OAI Server, read through OAI.

Notes on setting up your Linux system to work with filename encodings alien to your filesystem settings

UTF-8 is a common encoding used in filesystems and for data content.

If you are working on a UTF-8 system, then Java (and therefore GLI) will not give you access to files that do not have UTF-8 filenames. This means that in GLI, attempts to drag and drop files with names that are not UTF-8 will fail on such systems.

GLI will allow one to drag and drop files if the filesystem encoding was set to something that preserved the byte values of filenames (instead of destructively replacing characters that are not valid for the filesystem encoding with an "invalid" character, as happens with UTF-8 systems). In practice, this means that a filesystem encoding such as "Native Latin 1" (also called ISO-8859-1), which is a subset of Unicode, will preserve the underlying byte values in filenames, allowing you to drag and drop all sorts of filenames in GLI.

Drag And Drop in GLI will work by default on Windows since it is not a UTF-8 filesystem, but rather one that has a large overlap with Native Latin 1.

However, some Linux systems are set to UTF-8 by default, while others do not even have other encodings installed so you can't switch over.

The solution to making GLI work with "alien filename encodings" on such Linux systems is to switch the encoding to Native Latin 1 (this is regardless of what encoding your filenames are in). Where this is not installed, you would require Admin rights' to install Native Latin 1, before switching to it. The following contains instructions on doing both. Note that switching between installed encodings does not require Admin rights.


The instructions are derived from the thread of questions and answers openjdk and this page at Ubuntu Forums.

First find out whether you are already working with a Linux system set to Native Latin 1 (ISO-8859-1). Check by typing the following in an x-term:

locale -k LC_CTYPE | grep charmap

If the settings are indeed set to Native Latin 1, it should tell you that (en_US.)ISO-8859-1 is active.


Installation of Native Latin 1 (ISO-8859-1), which requires Admin rights, may not be required: check if this encoding is already installed on the machine first. You can check by running the following two commands in an x-term:

export LC_ALL=en_US.ISO8859-1 
export LANG=en_US.ISO8859-1

If it doesn't come back with any messages that look like failure (such as the encoding not being found), then it is installed and should now be active. Otherwise you need Admin permissions to install Native Latin 1 (ISO-8859-1) on your Linux system, as follows:

1. Open /var/lib/locales/supported.d/local as Root user and, at the bottom of the file, add the line:

en_US.ISO-8859-1 ISO-8859-1

2. Repeat the above step with the file /var/lib/locales/supported.d/en

3. Optional: Only if you wish to make the Native Latin 1 encoding the system default would you need to open /etc/default/locale as Root and change LANG="en_US.UTF-8" to LANG="en_US". (Or possibly LANG="en_US.ISO-8859-1".)

4. Then in an x-term, run the following to install the new encoding:

sudo locale-gen --purge

5. Restart the machine.

The above 5 steps need to be carried out once for en_US.ISO-8859-1 (Native Latin 1) to be supported by the machine. You would still need to apply the new encoding.


6. Having restarted the machine, to make the newly-installed encoding the active one, run the following commands in an x-term again. You do not need Admin rights for issuing the following two commands:

export LC_ALL=en_US.ISO8859-1 

export LANG=en_US.ISO8859-1

7. You can check if it all worked by running:

locale -k LC_CTYPE | grep charmap

Or by running:


It should tell you that (en_US.)ISO-8859-1 is active.

8. Now run GLI from the same x-term to allow it to work with the Native Latin 1 filesystem encoding settings.

Using Greenstone Plugin Extensions to process docx files and recent versions of PDF

Two extensions are available for download: Open Office and PDF Box, to process more recent versions of MS office documents and PDF document respectively.


  • The Open Office extension provides a document conversion facility if Open Office or LibreOffice is already installed on the system. In order to use the Open Office extension,
  • You will need Open Office installed. You may need to create an environment variable called SOFFICE_HOME and set this to the full path of your OpenOffice or LibreOffice installation folder, if:
    • you're on Windows and have OpenOffice/LibreOffice installed in a location other than "C:\Program Files\ 3". In that case, also ensure that your PATH environment variable contains the path to the "program" folder located in your SOFFICE_HOME path (the OpenOffice installation folder).
    • you're on Linux and have OpenOffice or LibreOffice installed in a location different from "/opt/openoffice.org3" or "/usr/lib/openoffice" (or "/usr/lib/libreoffice").
  • Once you have Open Office set up, download the Greenstone extension for it from here, which is available in tar.gz and zip formats, and unzip into Greenstone's ext folder. (If you have any issues try the latest version located here. Note that if you get the latest version of the open office extension, you cannot already have an instance of OpenOffice running when using GLI, you will need to terminate any previously running instance. It is also unlikely that you can get a separate instance of OpenOffice running after quitting GLI. If you wish to do so, you will need to use Task Manager to terminate the open office process launched by the extension upon running GLI.)
  • Before you can use this (or any other Greenstone extension), you will need to quit GLI and GS2-server if either are open and then you will need to relaunch GLI (or run Greenstone scripts) from a fresh command terminal, in order for the extension to become available in the Greenstone environment.
  • With OpenOffice and the extension installed and the Greenstone environment set up for this, Greenstone's Word, PowerPoint and Excel Plugins will have a new option, "-openoffice_conversion", allowing conversion with Open Office instead of the existing converter. Switching on this new option means that more recent Office formats like docx can be included in Greenstone collections and processed by Greenstone.


  • The PDF Box extension provides support for conversion of PDF documents to text. It supports the latest PDF versions (unlike Greenstone's standard pdftohtml program), so is useful for collections with new PDF documents.
  • Download the extension from here, which is available in tar.gz and zip formats, and unzip into Greenstone's ext folder. The PDF Box extension does not require additional software to be installed. Note, if you are using Java 1.7 then follow the instructions here.
  • If you are using the latest version of the PDF Box extension, open up your Greenstone's perllib\ file in a text editor and add the following code near the very end but before the terminating line which says "1;":
  # returns the path to the java command in the JRE included with GS (if any),
  # quoted to safeguard any spaces in this path, otherwise a simple java
  # command is returned which assumes and will try for a system java.
sub get_java_command {
    my $java = "java";
    if(defined $ENV{'GSDLHOME'}) { # should be, as this script would be launched from the cmd line 
	                           # after running setup.bat or from GLI which also runs setup.bat
	my $java_bin = &util::filename_cat($ENV{'GSDLHOME'},"packages","jre","bin");
	if(-d $java_bin) {
	    $java = &util::filename_cat($java_bin,"java");
	    $java = "\"".$java."\""; # quoted to preserve spaces in path
    return $java;
  • Before you can use the extension, you will need to quit GLI and GS2-server if either are open and then you will need to relaunch GLI (or run Greenstone scripts) from a fresh command terminal, in order for the extension to become available in the Greenstone environment.
  • PDFBox generates HTML documents from the PDF that may contain more whitespace between lines and paragraphs than you'd wish. In such a case, you can fix this on a collection basis using GLI. Open your collection in GLI, go to the Format panel, select Format Features to the left and DocumentText to the right. In the text-area for HTML Format String below, create an HTML style element to set the top and margin bottoms on a paragraph element to 0. You need to escape curly braces with a back slash. In the end your format statement for DocumentText will look like: <br/>
  p \{

Usage history

If you wish to get some usage output into a file:

1. Open up etc/main.cfg and edit the line that says

logcgiargs      false

to say:

logcgiargs      true

Save the file.

2. You will need to manually create a new text file called "usage.txt" in Greenstone's etc folder. This step will not be necessary in future versions of Greenstone.

3. Run the web server and usage.txt should become populated with information.

IMPORTANT information


It's been brought to our notice that in Greenstone 2.85 and earlier, the users database file is publicly accessible, allowing access to its passwords. To prevent access to the users database and other database files in your Greenstone 2 installation,

1. in a text editor, open your Greenstone folder's

  • apache-httpd/linux/conf/ file if you're on Linux
  • apache-httpd/windows/conf/ file if you're on Windows

2. at the bottom of the file, remove this section:

Alias /greenstone "**GSDLHOME**" 
<Directory "**GSDLHOME**"> 
  Options Indexes MultiViews FollowSymLinks 
  AllowOverride None 
  Order deny,allow 
  Allow from **HOST_IP** **HOSTS** localhost

3. In its place, have the following:

  # Deny access to all except collect and web folder
  <Directory />
    Order Deny,Allow
    Deny from all

  Alias /greenstone/web "**GSDLHOME**/web"
  <Directory "**GSDLHOME**/web">
    Order Deny,Allow
    **CONNECTPERMISSION** from all
    Allow from **HOST_IP** **HOSTS** localhost

3. Save the file

4. Restart your Greenstone 2 server

If using your own Apache web server

If you want to use a different Apache web server in place of the one included with Greenstone, you'll want to set the ScriptAlias and Alias for your Greenstone folders in your apache httpd.conf file as below. The aim is to deny access to all parts of Greenstone except the web, collect and cgi-bin folders:

  ScriptAlias /greenstone/cgi-bin "**GSDLHOME**/cgi-bin/**GSDL_OS_ARCH**"
  <Directory "**GSDLHOME**/cgi-bin/**GSDL_OS_ARCH**">
     Options None
     AllowOverride None
     Order deny,allow
     **CONNECTPERMISSION** from all
     Allow from **HOST_IP** **HOSTS** localhost

  Alias /greenstone/collect "**COLLECTHOME**"
  <Directory "**COLLECTHOME**">
     Options Indexes MultiViews FollowSymLinks
     AllowOverride None
     Order deny,allow
     **CONNECTPERMISSION** from all
     Allow from **HOST_IP** **HOSTS** localhost 
  # Deny access to all except collect and web folder
  <Directory />
    Order Deny,Allow
    Deny from all

  Alias /greenstone/web "**GSDLHOME**/web"
  <Directory "**GSDLHOME**/web">
    Order Deny,Allow
    **CONNECTPERMISSION** from all
    Allow from **HOST_IP** **HOSTS** localhost

In the above, replace the placeholders accordingly:

  • GSDLHOME: type of the full path to your Greenstone installation folder
  • GSDL_OS_ARCH: the OS of your server machine ("windows", "linux", or for macs "darwin").
  • CONNECTPERMISSION: this can be either "Deny" or "Allow". If you want public access to your web, collect and cgi-bin folders, set it to Allow.
  • HOST_IP: space-separated list of any particular IP addresses that you want to make the Greenstone server accessible from. At a minimum, you'll want to set it to the IP of your server machine itself.
  • HOSTS: space-separated list of particular hostnames of machines that you want to allow access to the Greenstone server accessible At a minimum, set it to the hostname of your server machine itself.
  • COLLECTHOME: this is the full path to where your collect folder is. By default, it is GSDLHOME/collect, unless you've installed it elsewhere.

Useful information

When you've built a collection of documents, you may discover that there appears to be a copy of all these documents in the collection's import, archives and index subfolders and wonder whether Greenstone could really be so inefficient with space as to keep 3 copies of everything. As it happens though, Greenstone uses hard-links both on Linux and Windows, in order to keep just one set of your documents. Then it simply hardlinks to these, instead of making copies. By default, Windows doesn't show you when files on your filesystem are hard-linked. If you choose to install the Windows extension program Link Shell Extension (LSE), it will put red arrows on files that are hard linked.

Known Issues and Patches

Greenstone applets (Phind, Collage) crash Firefox

See bugzilla report.

If attempting to view a java applet (like Collage or Phind phrase classifiers) crashes Firefox, then make sure you have the Java Applet plugin installed. If it is installed and Firefox is still crashing, then open firefox and visit the page


Scroll down to the property:

Set it to true (rightclick and choose toggle).

PDFBox extension stops GLI working

For some people, installing the PDFBox extension means that GLI will not run. This happens with Java 1.7.

A typical error message might include lines like this:

Failed to run: java >nul 2>&1
SAXParseException message: The entity name must immediately follow the '&' in the entity reference.

In this case, edit the file ext/pdf-box/perllib/plugins/ Look for the lines

#test to see if java is in path
my $cmd = "java";

and change to

#test to see if java is in path
my $cmd = "java -version";

Now restart GLI.

Note, you can download this change from here. Save the file to ext/pdf-box/perllib/plugins/

OAI downloading

Downloading over OAI in GLI (and on command line using has a couple of issues.<br/> 1. Resumption tokens don't work properly.<br/> 2. It is difficult to download all the records as leaving the max_records box unchecked means that the default (500) is used.<br/> 3. If a cache_dir is not specified, it tries to download into a new folder in the root directory, which may not be permissable.<br/>

A patched perl file can be downloaded from here. Save this file to perllib/downloaders/ This file fixes all these problems. (Fix to problem 1 thanks to DL Consulting.) Leaving the max_records box unchecked means that all records will be downloaded. So be careful!

More information about downloading using OAI can be found here.

OAIPlugin not extracting metadata from OAI files

If EmbeddedMetadataPlugin is present in a collection, it is blocking OAI files from being processed. Either remove EmbeddedMetadataPlugin from the collection, or edit the file perllib/plugins/ and delete the section of code that looks like this:

 sub get_default_block_exp() 
   return q^(?i)\.(oai)$^; 

EmailPlugin no longer working

In 2.85 EmailPlugin no longer recognised files. Download the following files into your perllib/plugins folder and rebuild the collection.

Some plugins don't obey the -OIDtype option

Some plugins, such as PDFPlugin, WordPlugin etc don't use their OIDtype option. To fix this, follow these steps:

In file perllib/plugins/, change the line $self→add_OID($doc_obj); to $self→add_OID($doc_obj, 1);

In file perllib/plugins/, look for the method starting sub add_OID {

Change the second line in that method: my ($doc_obj) = @_; to my ($doc_obj, $force) = @_;

and then change the next line return unless ($doc_obj→get_OID() =~ /^NULL$/ ); to return unless ($doc_obj→get_OID() =~ /^NULL$/ || $force);

Migrating collections from 2.84 to 2.85

2.84 collections do not need to be rebuilt for them to work in 2.85, but you will need to first pre-process them as follows, in order for document icons (like PDF icons) to still link to their source documents.

1. Copy all the 2.84 collections you need (these are located in your 2.84's collect folder) into your 2.85 Greenstone installation's collect folder.

2. Open up a terminal (a DOS prompt on Windows, an x-term on Linux, a Mac terminal on Mac).

3. Use your terminal to navigate into your Greenstone 2.85 installation. For example:

cd C:\Greenstone-2.85 

4. Now set up the terminal's environment for Greenstone by running your Greenstone's setup script as follows.

On Windows:


On Linux and Mac:

source setup.bash

5. Next, copy and paste the following command into your terminal. Then replace all 4 occurrences of <colname> with the name of the collection you want converted to 2.85.

On Windows:

db2txt collect\<colname>\index\text\<colname>.gdb | sed "s@srclink_file@srclinkFile@g" | txt2db collect\<colname>\index\text\<colname>.gdb

On Linux or Mac, do it in 2 steps:

db2txt collect/<colname>/index/text/<colname>.gdb | sed "s@srclink_file@srclinkFile@g" | cat | txt2db collect/<colname>/index/text/tmp.gdb

mv collect/<colname>/index/text/tmp.gdb collect/<colname>/index/text/<colname>.gdb

6. You can test if your collection was successfully converted, by previewing it and trying to browse in it. If you feel confident to start converting your other collections, then repeat step 5 for each collection you want converted. Make sure to replace <colname> with your collection's name each time.

Problem opening collection in GLI in Ubuntu

Problem encountered on: Ubuntu 12.04, perhaps it applies to other versions.

The error message that's displayed looks like:

Collection at .../collection_name.col cannot be opened


  • Delete "gsdl/perllib/cpan/perl-5.8/XML" and "gsdl/perllib/cpan/perl-5.8/auto" folders
  • In a terminal window, enter:
apt-get install libxml-parser-perl

Thanks to Amos Kujenga and Kurt Mattsson on the mailing list for discovering and documenting both the problem and its solution.

Unable to create new users on Ubuntu

Problem encountered on: Ubuntu 12.04 LTS and 12.05 LTS. May be applicable to other versions too.

Detecting the problem:

  • After installing and setting up Greenstone 2.85 on the Ubuntu 12.05 LTS, cannot add new users through the Admin pages.
  • Look in the apache-httpd/linux/logs/error_log file. Check whether there are error messages about the Greenstone installation missing the etc/key.gdb file
Fri Jul 13 17:50:35 2012] [error] [client] database open
failed on: /usr/local/Greenstone/etc/key.gdb, referer: %%http://localhost/dl/library.cgi%%
[Fri Jul 13 17:51:09 2012] [error] [client] File does not
exist: /var/www/favicon.ico[
  • Check your Greenstone etc folder to see if the file key.gdb is indeed missing.

Solution: If you have a working installation of Greenstone elsewhere (on another machine), then copy its etc/key.gdb over.


Thanks to Africa Bwamkuu and Amos Kujenga on the mailing list for reporting and resolving the problem. A more permanent fix seems elusive, since we have not been able to reproduce it on our Ubuntu 12.04 LTS here. The differences in behaviour may possibly be owing to Environment variables.

Other issues

  • CDS/ISIS plugin doesn't work on 64 bit machines.

Learning to use Greenstone

If your Greenstone is up and running and you're ready to start learning about how to use Greenstone, refer to the Greenstone 2 Tutorial Exercises.

Troubleshooting and other Questions

Consult the Greenstone FAQ at to see if any of your questions are answered and for workarounds of known issues. If any issues persist, write to the Greenstone Mailing List.

Updated Translations

Thanks to the following people for new and updated translations since 2.84:

  • Mohammad Hassanzadeh for Farsi translations
  • Dwight Martin, for Laotian translations and corrections to Thai
  • John Rose for French translations
  • Fathmath Shiham for Dhivehi translations
  • Gaku Yamaguchi for Japanese translations