Associating File with an Application in Gnome 3

Written by James McDonald

September 5, 2012

I have installed a program named OCRFeeder to be handle using tesseract.

OCRFeeder saves files with a .ocrf extension of application/zip mime-type.

By default you associate mime-types to applications the problem is the OCRFeeder files are recognized as application/zip files and associating OCRFeeder with all application/zip files would a problem.

How to Create a Specific mime-type to File Extension

If you want to associate a specific extension to an application see

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="">
  <mime-type type="application/x-ocrfeeder">
    <glob pattern="*.ocrf"/>
    <comment>OCRFeeder File</comment>

How to Associate Files with a Program in Gnome 3

First you right click on the file and choose properties

You then click the Open With tab of the properties dialog

Click the “Show other applications” button and scroll to select the Application you want to open the file with… Except in my case OCRFeeder is missing from the list:

How to get an Application to show up in the Open With List

make sure the Gnome Menu Editor alacarte is installed. If it isn’t on Fedora run

yum install alacarte

Once installed run alacarte and find your application (If your application is missing from the menu you may need to add it. This is not covered in this post)

Select the Application and click the Properties button. Here you can see the Command field is “ocrfeeder” only

You need to change the Command field to be “program_name %U” (Capital U) in this case ocrfeeder %U

Once you make the above change you can then go back into Nautilus (The Gnome 3 File Manager) and right click on the file, choose properties, open with, show other applications, scroll to find your application and click Set As Default



Note: The above mentioned procedure will only work if your program will take the file you want to open as an argument. Ironically after doing all the above for OCRFeeder it wouldn’t work because apparently OCRFeeder doesn’t take an ocrf file as an argument:

Usage: ocrfeeder [options]

  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -i IMAGE1 [IMAGE2, ...], --images=IMAGE1 [IMAGE2, ...]
                        images to be automatically added on start-up. Use the
                        option before every image path.
                        directory with images to be added automatically on






1 Comment

  1. isaac

    You save me


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

List local disks

GET-CimInstance -query "SELECT * from Win32_DiskDrive" DeviceID Caption Partitions Size Model -------- -------...

Create ISO using Powershell

Usage New-IsoFile -NewIsoFilePath C:\tmp\Hyper-V.iso-sources -ImageName Hyper-V -SourceFilePath 'C:\tmp\Hyper-V'...