{{man warn|Warning:|It is assumed that you know what you are doing. If you are trying to normally install stable Gramps version then see [[Installation]] page instead.}}

−

== Local versus Global install ==

+

This page describes other possible ways of running Gramps without necessarily installing it the conventional way.

−

GRAMPS can be installed so it is available for all users, this is called a ''global install''. However, you can also download GRAMPS to your home directory, and run it from there, which is a ''local install''.

+

The two alternatives to the conventional installation are:

+

* Running from the source directory

+

* Installing locally (e.g. into a home directory or elsewhere without root permissions) or into a non-default prefix

−

== Why Local? ==

+

== Why install non-conventionally? ==

−

There might be many reasons you want to run GRAMPS from source. You might have heard about a new feature you want to try that hasn't been released yet. You might be interested in adding a new feature. You might be interested in getting under the hood to take a look around. Whatever reason you are here, these are the steps necessary to run GRAMPS from source.

+

−

My advice is that you start with a good installation of a stable GRAMPS release, so you do a global install of whatever GRAMPS version your distribution packages, see [[Installation]]. The reason this is useful is that you can let your distribution worry about having all the dependencies properly installed, and it also set's up all the mime types, which must be done globally or GRAMPS will not be able to use them.

+

There might be many reasons you want to not conventionally install Gramps. You might have heard about a new feature you want to try that hasn't been released yet. You might be interested in adding a new feature. You might be interested in getting under the hood to take a look around. In case you have a stable working version of Gramps, you would not want to disturb that installation by installing something experimental on top of it.

−

== Get the source ==

+

== Common steps ==

−

Read [[Brief introduction to SVN]], and obtain the source code of the stable branch. At the moment, this is '''gramps2''' and is downloaded to a directory ''gramps2''

+

Whether you want to run from the source directory or do a proper local or non-default install, you need first to get the source and configure it.

−

== Configuration ==

+

Get the source either [[Brief introduction to SVN|from the svn]] or from the [http://sourceforge.net/projects/gramps/files/ released tarball] (in the latter case, unpack the tarball). Change to the <code>gramps34</code> directory (or whatever it is called for you):

−

Change to the "gramps2" directory:

+

cd gramps34

−

cd gramps2

+

−

Execute the autogen script. This needs to be done the first time and any time files are added.

+

−

./autogen.sh

+

−

Run make. This needs to be done once for GRAMPS to work.

+

−

make install

+

−

==Execution==

+

== Running from the source directory ==

−

You can now start GRAMPS locally, by typing on the command line:

+

−

python gramps.py

+

−

Now you can edit files and run "python gramps.py" without mucking with your official installation of GRAMPS.

+

This is the strategy in which just a bare minimum gets installed globally, to enable Gramps to start. The entirety of Gramps code will sit in your home directory, right where you downloaded it, and will run from there.

−

'''Note''': You should '''NOT''' do ''make install'' with the SVN version, as this will install the unstable version globally. If you want a more recent version of GRAMPS globally, download '''a stable release''' from sourceforge following the [[Installation]] instructions.

+

=== Bare minimum installation on Linux ===

+

+

First execute the <code>./autogen.sh</code> script. If your system lacks autotools then use <code>./configure</code> instead. This needs to be done the first time and any time files are added:

+

./autogen.sh

+

+

Next, install the bare minimum files for Gramps.

+

+

''Note'': If you have a fairly recent stable Gramps version, you may be able to skip this step. If in doubt, try without it, and see if you get errors related to mime types or gconf schemas. If you do, you need to go through this part.

+

+

Change to the <code>data</code> directory, then run <code>make install</code> as a super-user (Ubuntu users will probably use <code>sudo</code>):

+

cd data

+

make

+

su

+

make install

+

+

=== Bare minimum installation on Windows===

+

+

Fundamentally all you need to run Gramps on Windows is the const.py file which is generated from the template named const.py.in. During generation, the Gramps version is placed in const.py. If you don't care about the version, you can just copy const.py.in to const.py. First, from a command prompt, cd into the directory where you downloaded or extraced the source files. Then, issue the following command:

+

+

copy src\const.py.in src\const.py

+

+

=== Running Gramps ===

+

You can now start Gramps locally, by typing on the command line:

+

cd src

+

python gramps.py

+

+

Now you can edit files and run <code>python gramps.py</code> without mucking with your official installation of Gramps.

+

+

'''Note''': You should '''NOT''' do ''make install'' with the SVN version, as this will install the unstable version globally. If you want a more recent version of Gramps globally, download '''a stable release''' from sourceforge following the [[Installation]] instructions.

+

+

=== Limitations ===

+

+

This way you should be able to run Gramps and be OK in most regards. You will probably not get the current translations because we did not install them properly. For that see:

This is the 100% proper installation strategy that allows you to skip nothing and install into weird places. People do that either because they lack root access and cannot install the regular way, or because of their personal reasons (e.g. weird systems without /usr dir :-). If you fall into this category, start with the [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/gramps2/INSTALL?view=log INSTALL] file shipped with the source.

+

+

Most things in Gramps can be installed anywhere and Gramps will happily run from that location. The exceptions are:

+

* gconf schemas

+

* mime types

+

+

You have to first decide where you want to install these, and then let the installer know about your decision. The trick is to install them in such locations where GConf and shared-mime-types system will know to look.

+

+

=== GConf schemas ===

+

+

By default, <code>gconfd</code> will look in these places:

+

# Whatever is returned by running: <code>gconftool-2 --get-default-source</code>

+

# The <code>xml::$HOME/.gconf</code> or <code>xml:merged:$HOME/.gconf</code>

+

The former is a global setup. The latter is the per-user setup, not system-wide. There is a number of ways to let <code>gconfd</code> know where else to look, but this is outside the scope of installing gramps. Since the first way is a no-go for you for whatever reasons, you will need to pass something like this to the <code>./auotgen.sh</code> or <code>configure</code> script as an argument:

# <code>/usr/local/share/mime</code> (this may be broken on some systems)

+

# <code>$HOME/.local/share/mime</code> (this is a per-user setup, not system-wide)

+

Likewise, there's a number of ways to instruct the shared mime system to look in other places, but this is the whole other story. Since the first way does not work for you, you will go with something like:

+

--with-mime-dir=$HOME/.local/share/mime

+

+

=== Other arguments ===

+

+

Since you are doing a local install, most likely you will need to specify the non-local prefix for your installation:

+

--prefix=$HOME/my_gramps_path

+

+

A local install will also need to skip the scrollkeeper registration of the helpfiles:

+

--disable-scrollkeeper

+

+

=== All together now ===

+

+

Putting it all together, a typical non-local install will start from running <code>./auotgen.sh</code> or <code>configure</code> with these arguments:

+

--prefix=$HOME/my_gramps_path \

+

--with-gconf-source=xml::$HOME/.gconf \

+

--with-gconf-schema-file-dir=$HOME \

+

--with-mime-dir=$HOME/.local/share/mime \

+

--disable-scrollkeeper

+

+

Of course, your mileage may vary, because you may want to go a global install into <code>/src/weird/path</code> or whatever else you feel like doing. The only thing to worry about is that gconf schemas and mime types are properly found. So either install them in their default places, or maybe patch them to use your private paths.

Why install non-conventionally?

There might be many reasons you want to not conventionally install Gramps. You might have heard about a new feature you want to try that hasn't been released yet. You might be interested in adding a new feature. You might be interested in getting under the hood to take a look around. In case you have a stable working version of Gramps, you would not want to disturb that installation by installing something experimental on top of it.

Common steps

Whether you want to run from the source directory or do a proper local or non-default install, you need first to get the source and configure it.

Get the source either from the svn or from the released tarball (in the latter case, unpack the tarball). Change to the gramps34 directory (or whatever it is called for you):

cd gramps34

Running from the source directory

This is the strategy in which just a bare minimum gets installed globally, to enable Gramps to start. The entirety of Gramps code will sit in your home directory, right where you downloaded it, and will run from there.

Bare minimum installation on Linux

First execute the ./autogen.sh script. If your system lacks autotools then use ./configure instead. This needs to be done the first time and any time files are added:

./autogen.sh

Next, install the bare minimum files for Gramps.

Note: If you have a fairly recent stable Gramps version, you may be able to skip this step. If in doubt, try without it, and see if you get errors related to mime types or gconf schemas. If you do, you need to go through this part.

Change to the data directory, then run make install as a super-user (Ubuntu users will probably use sudo):

cd data
make
su
make install

Bare minimum installation on Windows

Fundamentally all you need to run Gramps on Windows is the const.py file which is generated from the template named const.py.in. During generation, the Gramps version is placed in const.py. If you don't care about the version, you can just copy const.py.in to const.py. First, from a command prompt, cd into the directory where you downloaded or extraced the source files. Then, issue the following command:

copy src\const.py.in src\const.py

Running Gramps

You can now start Gramps locally, by typing on the command line:

cd src
python gramps.py

Now you can edit files and run python gramps.py without mucking with your official installation of Gramps.

Note: You should NOT do make install with the SVN version, as this will install the unstable version globally. If you want a more recent version of Gramps globally, download a stable release from sourceforge following the Installation instructions.

Limitations

This way you should be able to run Gramps and be OK in most regards. You will probably not get the current translations because we did not install them properly. For that see:

Installing locally

This is the 100% proper installation strategy that allows you to skip nothing and install into weird places. People do that either because they lack root access and cannot install the regular way, or because of their personal reasons (e.g. weird systems without /usr dir :-). If you fall into this category, start with the INSTALL file shipped with the source.

Most things in Gramps can be installed anywhere and Gramps will happily run from that location. The exceptions are:

gconf schemas

mime types

You have to first decide where you want to install these, and then let the installer know about your decision. The trick is to install them in such locations where GConf and shared-mime-types system will know to look.

GConf schemas

By default, gconfd will look in these places:

Whatever is returned by running: gconftool-2 --get-default-source

The xml::$HOME/.gconf or xml:merged:$HOME/.gconf

The former is a global setup. The latter is the per-user setup, not system-wide. There is a number of ways to let gconfd know where else to look, but this is outside the scope of installing gramps. Since the first way is a no-go for you for whatever reasons, you will need to pass something like this to the ./auotgen.sh or configure script as an argument:

Likewise, there's a number of ways to instruct the shared mime system to look in other places, but this is the whole other story. Since the first way does not work for you, you will go with something like:

--with-mime-dir=$HOME/.local/share/mime

Other arguments

Since you are doing a local install, most likely you will need to specify the non-local prefix for your installation:

--prefix=$HOME/my_gramps_path

A local install will also need to skip the scrollkeeper registration of the helpfiles:

--disable-scrollkeeper

All together now

Putting it all together, a typical non-local install will start from running ./auotgen.sh or configure with these arguments:

Of course, your mileage may vary, because you may want to go a global install into /src/weird/path or whatever else you feel like doing. The only thing to worry about is that gconf schemas and mime types are properly found. So either install them in their default places, or maybe patch them to use your private paths.