When dealing with metadata of any sort exiftool should always be the utility of choice. It comes with a plethora of different options and commands that allow you to tag images at your will.
For instance, if you want to tag all images in a specific folder with the geodata provided by a
KML file you can use the following commands:
exiftool -geotag gps.kml *.jpg
Of course there are far more options and settings available. For all the intricate details surrounding GPS-tagging with exiftool I'd advise you to consult this section of the exiftool documentation.
exiftool is part of the official Ubuntu repositories and can be installed with the following command:
sudo apt-get install libimage-exiftool-perl
There are multiple front-ends to exiftool available. GPicSync is one that specializes in Geotagging images. The interface is simple and easy to use:
Having specified the image folder and the GPS file you want to use, you simply click on Synchronize to update the image metadata with GPS tags.
Additional options allow you to set a time offset and to even view your images in Google Earth.
Installing GPicSync requires manually setting up its dependecies and downloading the python source code. There have been calls to package GPicSync in Ubuntu/Debian, but all available packages are outdated.
Here are the steps you will have to follow to install and set up GPicSync:
Install all dependencies
sudo apt-get install libimage-exiftool-perl python-unidecode python-imaging python-wxgtk2.8
Check out the latest python source
git clone https://github.com/notfrancois/GPicSync.git
Navigate to the cloned folder, make GPicSync executable, and run it:
chmod +x gpicsync-GUI.py
That's it. GPicSync should be up and running. To better integrate the app into your system you could look into creating a launcher for it.
I have tested these installation instructions on Ubuntu 12.04. Package names and dependencies might differ on newer releases.
Converting between different GPS data formats
One downside to GPicSync is that it only supports two input formats, GPX and NMEA. Compared to exiftool that's very little. However, if need-be you can always convert between different GPS data formats by using GPSBabel. E.g., to convert from KML to GPX you could use the following command:
gpsbabel -i kml -f gps.kml -o gpx -F gps.gpx
Another option would be to use one of the many online converters such as this one.
gpsbabel is part of the official Ubuntu repositories and can be installed with:
sudo apt-get install gpsbabel
Further reading on gpsbabel usage.