Getting Started for users of Ubuntu / Ubuntu Budgie 20.04

How to install and configure Gramps 5.1.2 on Ubuntu 20.04 (and probably other Ubuntu flavours), and be able to produce a standard family tree chart. There seem to be many ways of working in Gramps - the below works ok for me.

Install Gramps:

sudo apt-get install gramps

Install extras for Chart views (the first may already be installed on your distro):

sudo apt-get install graphviz
sudo apt install gir1.2-goocanvas-2.0

Now start Gramps from the desktop main menu.

Edit, Preferences, General tab, Third Party Addons Management:
Check for Addon updates: Always, What to check: New & Updated,
Where: https://raw.githubusercontent.com/gramps-project/addons/master/gramps51
Clear the ‘Do not ask’ checkbox.
Click ‘Check for Updated Addons Now’ button
Select All, click Install button.
[I got 2 errors: 1. PostgresSQL (1.0.10) Network Chart (0.0.23) error, 2. LifeLineChartView Plugin failed to load required module life-line-chart version 1.7.5; these errors haven’t caused any problems yet]
Close, Close

To make a new family tree: top menu Family Trees, Manage, New, provide a name

On left-hand menu select People, and enter a number of people using the + button at the top; in each case enter at least Given Name, Family Name then using the Events tab:
Hit +, event type Birth, give a date. To add a picture of the person select the Gallery tab, click +, select a picture (jpg is ok), OK, OK, OK

To choose a set of parents, click Families on the left, hit +, select Partner1 and Partner2 using the ‘Select a Person’ buttons. Then if desired on the Events tab, +, Marriage, give a date, OK, OK

Now select an adult parent in the People list (single click), then click Relationships on the left.
Click the + by Family, select Children tab, click +, Add Existing Person button, select the child, OK, OK

To see a pretty standard view of the family tree:
Click People on the left & select a parent (single click)
Click Charts on the left
Menu at top: View, Graph View

I’d be happy to edit this if there are neater quicker methods or if there are errors.

2 Likes

Hi Norman, good initiative to create an installation guide.
There are a few additional packages you need to have all addons working properly. You can find them here: GitHub - gramps-project/gramps: Source code for Gramps Genealogical program. You have to scroll down to find the list with all the requirements.
Another thing to mention is that Gramps don’t store all your media like pictures and scanned source information. So you need to create a directory (I am using /srv/gramps for that purpose) and create a link in Gramps to that directory via ‘edit’ > ‘preferences’ > fill in your directory (/srv/gramps/) in ‘base path for relative media paths’. After that you can store for example a picture in that directory and create a link to that via Media in Gramps (by doing that you can check the checkbox ‘convert to a relative path’ which you see in the ‘Select a media object’ screen at the bottom).

Hope this helps a bit :slight_smile:

1 Like

Thanks Jan - unfortunately I don’t see that list when I go to the link you give.

For the directories: yes I did discover early that Gramps doesn’t transfer eg image files into its database - so I did create a set of directories (in any case needed for things like images of trees or docs that apply across the project). An issue I have is that if I want to rename a file (for example to create an improved naming convention) - I don’t see a way of searching the gramps database for that filename.

Now that I’ve used Gramps for a couple of weeks I start to see what a terrific piece of software it is! There are a few self-created problems that I have discovered - for example not entering place of birth/baptism etc etc - things that help when triangulating data to identify a person with near certainty. I also struggle a bit in what I feel is certain enough to link to a parent or child. There are also a few things that I haven’t found (for example indicating an approximate date so that in all lists more that just the date is displayed eg 1867 or <1867 or 1867±1 or bap1867 or bur1867 etc. I know this can be in a comment, but if visible scrolling through the People list would help spot merges or id.

I’ll update my little installation guide when I’ve used Gramps a bit more.

Maybe a more specific link: GitHub - gramps-project/gramps: Source code for Gramps Genealogical program

If you rename a filename you can search for the old filename via Media and at the right you find a filter. In the filter you can put the filename (or a part of it). Click on search and your media item appears. Double click on the item and change the path into the new file name.

And yes, starting with Gramps is a painful process. So, I suggest you should watch a few videos like Gramps Tutorial #4: Creating a tree & adding people & relationships - YouTube and read the wiki (Gramps). And of course the manual (Portal:Using Gramps - Gramps).

But, be aware Gramps is created by a community who believe in open source software. So, anyone can provide new ideas or improve things. I am using Gramps for several years now and I see a lot of improvements every year.

If you’ve forgotten to fill in information like birth locations or dates you always can do that on another time (via Persons, looking for the person you need and double click on that one).
And there you’ll be able to adjust the way a date appears for that person (next to the date field there’s a button ‘start date editor’).

Most important for using Gramps is the way you organize your work. And then you’ll see how flexible Gramps is. Two scenarios:

  1. Start with collecting sources: add a source via Media, link to it via Sources, add it to a (new) person in Person. By doing that, a citation will be created automatically.
  2. Start with a (new) person in Person, fill in all information you know and create a (new) source from that person directly (in tab source citations, click on + sign). Or, if you don’t have that source information, you can mark that person with a tag (for example: ‘source needed’) so you can do that on another moment.
    So, you’re not forged to use one way of working :slight_smile:

Thanks again Jan. After these couple of weeks I have at last understood that getting the workflow right is rather important! After my initial hiccups I found that basics all easy and logical (maybe helped by my background in database design - I can see the logic of dealing with the frequent many-to-many relationships!). So much work goes into it that I also see the vital importance of regular backups (ok & in hand). I’ll try your suggestions.
(BTW open-source is always my 1st choice!)

Revised version 26/1/21 (sorry about lack of good formatting - pasted from my text file):

How to install and configure Gramps 5.1.2 on Ubuntu 20.04 (and probably other Ubuntu flavours), and be able to produce a standard family tree chart. There are many ways of working in Gramps - the below works ok for me (with some errors as mentioned below).

Install & Configure Gramps:

sudo apt-get install gramps

Install prerequisites for Chart views etc (some may already be installed on your distro):
(Note that pip commands must not be preceded by sudo. In general it is very hard to know if a given prerequisite is to be installed with ‘sudo apt install’, or pip3!. Gramps uses Python 3, not Python 2)

sudo apt-get install graphviz libgraphviz-dev pkg-config
sudo apt install python3-pip
sudo apt install python3-graphviz
sudo apt install gir1.2-goocanvas-2.0
sudo apt install libpango1.0-dev
pip3 install life-line-chart
(this gets rid of startup errors for Life Line charts about gpr.py)
(however not sure if LL charts working ok: X on icons, cannot zoom in)
sudo apt install python3-networkx
(this is needed for the Network Chart report)
sudo apt-get install gir1.2-pango-1.0
(PangoCairo - already installed)
Is librsvg2 available/needed? Can’t find it.
Already installed (checked with sudo apt install ):
xdg-utils
gir1.2-goocanvas-2.0
libgoocanvas-2.0-9
(maybe more needed later - see Prerequisites Checker below)

Now start Gramps from the desktop main menu.

Edit, Preferences, General tab, Third Party Addons Management:
Check for Addon updates: Always, What to check: New & Updated,
Where: https://raw.githubusercontent.com/gramps-project/addons/master/gramps51
Clear the ‘Do not ask’ checkbox.
Click ‘Check for Updated Addons Now’ button
Select All, click Install button.
Close, Close

Help, Plugin Manager: lists all available plugins - can Install or Uninstall.

Dealing with addons that won’t install or cause startup errors:
This could be due to missing prerequisites, so install the Plugin ‘Prerequisite Checker’ if not already installed.
On the Gramps Dashboard (select top of left-hand column), in a space R mouse, Add a Gramplet, Prereq Checker.
Prerequisites will be external to Gramps (so install to OS or Python separately eg in Linux terminal).
Note: PostgreSQL won’t install & is not needed - so no need to install.
Once all addon errors have been dealt with, in Edit|Preferences|General|Third Party
 check the
‘Do not ask’ checkbox to avoid being repeatedly reminded about addons that you chose not to install.
“Once you have finished with the Prerequisites Checker Gramplet remove it from the Dashboard otherwise, it slows down Gramps by refreshing every time you change views!”

Create a folder somwhere in your system that gets regularly backed up: My-Family-Trees
and another folder (not inside My-Family-Trees) called My-Family-Trees-Backup.
Within the folder My-Family-Trees create folders as follows for resources, for example:
Articles about families
Crests
Family Histories
Info on alternative names
Info on Individuals
Info on Places
Places
Portraits
Trees
Web Sites & software info
Wills
As you gather information place files in these & use a consistent naming convention eg:
FamilyName_Person-or-PlaceName_ResourceType_DateFound
(it’s worth thinking about as changing names of files will break links to them from your family tree database)

To make a new family tree:

Top menu Family Trees, Manage, New, provide a name

To make a tree with 2 parents and a child:

On left-hand menu select People, and using the + button at the top repeat entering each parent and the child; in each case enter at least Given Name, Family Name then using the Events tab:
Event tab, hit +, event type Birth (& death if known), give a date, add a place if at all possible (try to be consistent - you can merge places if necessary later - this info will be REALLY useful in piecing together families from patchy info). To add a picture of the person select the Gallery tab, click +, select a picture (jpg is ok), OK, OK, OK

To choose a set of parents, click Families on the left, hit +, select Partner1 and Partner2 using the ‘Select a Person’ buttons. Then if desired on the Events tab, +, Marriage, give a date. Then select the Children tab, ‘Add an Existing Person’ button, choose the child, OK, OK, OK

Now select an adult parent in the People list (single click), then click Relationships on the left. Notice that in this view you can give this person parents, siblings or children either by selecting an existing person in your Person list or using the + to create a new person then and there.

To see a pretty standard view of the family tree:
Click People on the left & select a parent (single click)
Click Charts on the left
Menu at top: View, Graph View

Backup:

Once you get into it - many hours of work will go into making your tree. So regular backup is vital.
Edit|Preferences|Family Tree:
Backup Path - choose My-Family-Trees-Backup (see above).
Select Backup on Exit, and Autobackup Every Hour.
Ensure that My-Family-Trees-Backup gets backed up regularly.
Occasionally do this:
Top menu Family Trees, Export, Next, GEDCOM, Next, Next, Filename eg Family_20210115.ged, and
folder My-Family-Trees-Backup, Next, Apply.
Email this file and the latest *.gramps file (in that sam folder) to youself, together with a zipped file containing the whole of the folder My-Family-Trees.

And what about sudo apt install python3-graphviz
I think you should use pip3 and not pip which is for python 2.x (it depends on pip -v or pip3 -v)

The same for:
python3-networkx instead of pip install networkx

PangoCairo → sudo apt-get install gir1.2-pango-1.0 normaly already installed (system base)
librsvg2 → normaly already installed (system base). it’s used by cairo, not by gramps

Thanks very much SNoiraud. This is becoming quite complex.
I have updated my posting - prerequisites section is pretty long now.
I don’t think librsvg2 is installed - at least it doesn’t exist in Ubuntu’s repository:

sudo apt install librsvg2
[sudo] password for all:
Reading package lists
 Done
Building dependency tree
Reading state information
 Done
E: Unable to locate package librsvg2

So prerequisites could be:

  • something integrated into Gramps
  • libraries installed into the OS (sudo apt install
)
  • python 2 modules - installed with pip install

  • python 3 modules - installed with pip3 install

  • python 3 modules installed with sudo apt install python3-


Making this more complex is the Gramps prerequisites checker which states that some things are present, but lists others ambiguously, not making clear which of the above forms of install is appropriate. I get it that Gramps programmers can’t be expected to know all the installation routes for different OSs - but it would really help to know if a given prerequisite is an OS library, a Python 2 module or a Python 3 module.

I had never heard of PIP before installing Gramps. Are you saying that ‘pip3 install graphviz’ does the same as sudo apt install python3-graphviz? (I have been using Linux for about 15 years - but never messed with Python).

Do we need to provide each Python prerequisite for both Python 2 and Python 3? I’m not sure how one can tell if Gramps itself or an Addon uses Python 2 or Python 3, or whether if it is provided for Python 3 that covers Python 2 as well


Also
 pip complains, asking for pip -m instead, but not giving the form of the new command or stating whether pip -m will become obsolete. I suppose it might be ‘pip -m install pygraphviz’ for example.

I don’t use ubuntu 20. I’m on ubuntu 18
It existed in 18.

Do you have something like? /usr/lib/x86_64-linux-gnu/librsvg-2.so.2 (locate librsvg)
If yes, you can do: dpkg -S /usr/lib/x86_64-linux-gnu/librsvg-2.so.2 or the file you found

Gramps only use python3 so no need for the python2 modules
python3 modules are installed in /usr/lib/python3/dist-packages
python2 modules are installed in /usr/lib/python2.7/dist-packages/

It depends on install (root or lambda user)
personaly, I prefer to use the standard install instead of pip except if you are a developper and want to use the latest functionalties.

Thanks again.
So I tried:
sudo apt install python3-life-line-chart
and it was not found.
My original ‘pip install life-line-chart’ appeared to succeed - but this must be wrong as you say it is for Python 2?

Just to be clear: are you saying that it is unnecessary to use the pip commands at all and that every possible prerequesite can either be installed as:
sudo apt install myOSlibrary
(if it is an OS library)
or
sudo apt install python3-myPymodule
(if it is a Python module)
?
Thanks

One of the problems with many of the libraries that are mentioned is that there are newer versions of dependences already installed, and some of them uninstall the newer ones and install something older, and then you get a conflict


It’s not easy to install anything on Linux, the need of virtual environment is more or less mandatory when installing anything regarding Python, Node, JS.

If you use one research tool and want to install another, you have the risk of corrupting both if you dont use virtual environment for the different languages, at least for those of us that’s not superusers on Linux

I have this problem with 3 Python software I have tried to use, and at least 3-4 Node applications

So now I’m on my 10 test with WSL2.

Just to say, Gramps is not that big of a problem regarding this, but some of the dependences of some of the add-ons can get problems


Thanks again. SNoiraud - I am still not fully understanding this.
Why install one Python 3 package like this:
sudo apt install python3-graphviz
and another one like this:
pip3 install life-line-chart
?
I don’t see why you need two install methods.
Why not:
sudo apt install python3-life-line-chart?

Because there is no package in ubuntu for life-line
you can use “apt-cache search package” to see if it exists for your distribution
ie:

apt-cache search lifeline

lifelines - logiciel de généalogie en mode texte
lifelines-doc - documentation for lifelines, a genealogy software system
lifelines-doc-sv - swedish documentation for lifelines, a genealogy software system
lifelines-reports - reports for lifelines, a genealogy software system

apt-cache show lifelines

1 Like

Thanks. So now I am really confused: is graphviz a Python module/package or is it an Ubuntu package? I think I need to do my homework to understand better what these addons really are!

If ALL Gramps addons are Python packages - then surely a help guide should use pip3 to do all addon installations? Who knows what Ubuntu flavour they may be using?

Ubuntu is not the only distribution to use gramps. The package maintainer of your distribution should give you this information. The problem is the addons for which you have this kind of problems.
In this case, I think each addon developper should give the pre-requisites and how to find them for each distribution. It’s a big job.

1 Like

However - if all prerequisites are Python packages there is a universal solution perhaps?
python3 -m pip package-name

If this is right it has to be the way to go.
(I just tried the following:
python3 --help (to see what -m does)
python3 -m pip --help (to see what the python package pip can do))

I would like an installation procedure which will never install an older version over a newer version though.

Just tried:
python3 -m pip list --outdated

It produces a massive list - I wonder if I should update them all?

I have had a warning from somebody on the Ubuntu forums not to do this as it could break the system. I’ll assume though that any that I installed as prerequisites that were not already on the system can be updated freely.

Updated version 28/1/21 for Gramps 5.1.2 on Ubuntu 20.04:

How to install and configure Gramps 5.1.2 on Ubuntu 20.04 (and probably other Ubuntu flavours), and be able to produce a standard family tree chart. There are many ways of working in Gramps - the below works ok for me (with some errors as mentioned below).

Install & Configure Gramps:

sudo apt-get install gramps

Install prerequisites for Chart views etc (some may already be installed on your distro):
(Note that python3 commands are not preceded by sudo. In general it is very hard to know if a given prerequisite is to be installed with ‘sudo apt install’, or python3!. NB Gramps uses Python 3, not Python 2).

Note that any Python packages that are already on the system should not be updated as this may break the system and render the OS unbootable!

Existing Python packages with their version numbers can be listed using ‘python3 -m pip list’.
(will require Ubuntu package ‘python3-pip’ to have been installed - see below).

Ubuntu packages can be checked for using 'sudo dpkg -l | grep ’ followed by at least part of package name:
For example looking for xdg-utils this will do:
sudo dpkg -l | grep xgd
Also alternatively to see if a package is in an Ubuntu repository
& if it is installed it will say (installed), first part of name is enough:
apt search xdg

Install the package if is not already on the system.

In a terminal:
sudo apt-get install graphviz libgraphviz-dev pkg-config
sudo apt install python3-pip
sudo apt install gir1.2-goocanvas-2.0
sudo apt install libpango1.0-dev
The following 3 Python packages were not on my system (check using python3 -m pip list)
so here they are installed:
python3 -m pip install graphviz
python3 -m pip install life-line-chart
(this gets rid of startup errors for Life Line charts about gpr.py)
(however not sure if LL charts working ok: X on icons, cannot zoom in)
python3 -m pip install networkx
(this is needed for the Network Chart report)

Already installed on my system:
gir1.2-pango-1.0 (checked with sudo dpkg -l | grep)
xdg-utils (checked with sudo dpkg -l | grep)
libgoocanvas-2.0-9 (checked with sudo dpkg -l | grep)
librsvg2 (as librsvg2-2, assume ok, checked with sudo dpkg -l | grep)
bsddb3 (checked with python3 -m pip list)
pyICU (checked with python3 -m pip list)
ghostscript (checked with python3 -m pip list)
Pillow (checked with python3 -m pip list)
(maybe more needed later - see Prerequisites Checker below)

Failed attempts to install prerequisites:
python3 -m pip install fontconfig (fails with errors)

Now start Gramps from the desktop main menu.

Edit, Preferences, General tab, Third Party Addons Management:
Check for Addon updates: Always, What to check: New & Updated,
Where: https://raw.githubusercontent.com/gramps-project/addons/master/gramps51
Clear the ‘Do not ask’ checkbox.
Click ‘Check for Updated Addons Now’ button
Select All, click Install button.
Close, Close

Help, Plugin Manager: lists all available plugins - can Install or Uninstall.

Dealing with addons that won’t install or cause startup errors:
This could be due to missing prerequisites, so install the Plugin ‘Prerequisite Checker’ if not already installed.
On the Gramps Dashboard (select top of left-hand column), in a space R mouse, Add a Gramplet, Prereq Checker.
Prerequisites will be external to Gramps (so install to OS or Python separately eg in Linux terminal - see above).
Note: PostgreSQL won’t install & is not needed - so no need to install.
Once all addon errors have been dealt with, in Edit|Preferences|General|Third Party
 check the
‘Do not ask’ checkbox to avoid being repeatedly reminded about addons that you chose not to install.
“Once you have finished with the Prerequisites Checker Gramplet remove it from the Dashboard otherwise, it slows down Gramps by refreshing every time you change views!”

Create a folder somwhere in your system that gets regularly backed up: My-Family-Trees
and another folder (not inside My-Family-Trees) called My-Family-Trees-Backup.
Within the folder My-Family-Trees create folders as follows for resources, for example:
Articles about families
Crests
Family Histories
Info on alternative names
Info on Individuals
Info on Places
Places
Portraits
Trees
Web Sites & software info
Wills
As you gather information place files in these & use a consistent naming convention eg:
FamilyName_Person-or-PlaceName_ResourceType_DateFound
(it’s worth thinking about as changing names of files will break links to them from your family tree database)

To make a new family tree:

Top menu Family Trees, Manage, New, provide a name

To make a tree with 2 parents and a child:

On left-hand menu select People, and using the + button at the top repeat entering each parent and the child; in each case enter at least Given Name, Family Name then using the Events tab:
Event tab, hit +, event type Birth (& death if known), give a date, add a place if at all possible (try to be consistent - you can merge places if necessary later - this info will be REALLY useful in piecing together families from patchy info). To add a picture of the person select the Gallery tab, click +, select a picture (jpg is ok), OK, OK, OK

To choose a set of parents, click Families on the left, hit +, select Partner1 and Partner2 using the ‘Select a Person’ buttons. Then if desired on the Events tab, +, Marriage, give a date. Then select the Children tab, ‘Add an Existing Person’ button, choose the child, OK, OK, OK

Now select an adult parent in the People list (single click), then click Relationships on the left. Notice that in this view you can give this person parents, siblings or children either by selecting an existing person in your Person list or using the + to create a new person then and there.

To see a pretty standard view of the family tree:
Click People on the left & select a parent (single click)
Click Charts on the left
Menu at top: View, Graph View

Backup:

Once you get into it - many hours of work will go into making your tree. So regular backup is vital.
Edit|Preferences|Family Tree:
Backup Path - choose My-Family-Trees-Backup (see above).
Select Backup on Exit, and Autobackup Every Hour.
Ensure that My-Family-Trees-Backup gets backed up regularly.
Occasionally do this:
Top menu Family Trees, Export, Next, GEDCOM, Next, Next, Filename eg Family_20210115.ged, and
folder My-Family-Trees-Backup, Next, Apply.
Email this file and the latest *.gramps file (in that sam folder) to youself, together with a zipped file containing the whole of the folder My-Family-Trees.