I don't know what file types GPSprune handles and which, specifically, you are interested in. So for the sake of simplicity let's just say you want to open files with the
.foo extension in GPSprune. These files however are recognized as text files or XML files rather than GPSprune specific files. What you will have to do then is to first define a new MIME type that is specific to these files.
To do so you can either use assoGiate, a GUI file type editor, or manually define the new MIME type. In this tutorial I will show how to do this manually.
Create a new text file called
foo.xml and open it up in your favorite text editor.
Copy and paste the contents of the following text box:
<?xml version="1.0" encoding="utf-8"?>
<comment>GPSprune GPS dump</comment>
<comment xml:lang="en">GPSprune GPS dump</comment>
Make sure to replace all instances of
.foo with the actual extension and edit the comment/description to your wishes.
Next save the file and move it to
~/.local/share/mime/packages. Update the mime database by typing in a terminal:
.foo files are now recognized as a separate MIME entity. You can check whether everything worked by right clicking on a
.foo file of your choice and looking at the file type listed under
Let's add an association to GPSprune now:
~/.local/share/applications/mimeapps.list in an editor of your choice. Search for the
[Default Applications] entry or create it if it doesn't exist yet. Then add the following line under default applications:
You should now be able to immediately open up your
.foo files with GPSprune and likely also to drag and drop them on the respective launcher.
Sources and related Q&As:
Add custom command in the open with dialog?
How can I deal with file association in different application(not in Nautilus)?
How to associate file extension (not file type) for a particular application?