[Solved] Unity desktop and nautilus not recognizing the Calibre application for .mobi and .epub files

Calibre is a great application for managing your ebook collections.  It recognizes many different ebook formats.  I use it as a reader for .mobi, and .epub files.

After installing calibre on my Ubuntu 12.04 box, I was annoyed to find that nautilus on the Unity desktop did not associate the calibre application with .mobi and .epub files.  In other words, when I tried to open a .mobi file, nautilus didn’t know what application to launch.  Furthermore, nautilus no longer gives you the option to right-click a file and add a custom application to handle it.  You are forced to use a static list of already known applications.

Solution 1:

There appears to be an error in the desktop launcher file for calibre.  Edit the file /usr/share/applications/calibre.desktop.

Change

Exec=calibre

To be

Exec=’/usr/bin/calibre’ %f

and save.

Now nautilus should give you the option of selecting calibre from the list of applications.  Right click on a .mobi or .epub file and select properties.  Select the “Open with” tab and select the calibre application and click either “add” or “set as default”.

Solution 2 (creating a gnome desktop launcher) :

I’m going to show you how to create a desktop “launcher” with the basic contents required.  You can modify the name and contents as needed to suit other applications and file formats.

Create a file named calibre.desktop in your home folder under ~/.local/share/applications/ (to make this available to all uses, you would copy this file to /usr/share/applications)

Add the following to that file and save.

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=’/usr/bin/calibre’ %f
Name=calibre
Comment=e-book manager and reader
NoDisplay=true
Name[en_US]=calibre

Now go back to nautilus and right click on any .mobi or .epub file and select properties.  Click the “Open with” tab.  Select show other applications.  You should now see calibre in the list.  Select calibre and click “set as default”.

You are done.  Nautilus should now recognize calibre as the default application for opening .epub or .mobi files.

Further reading:

 

Advertisements

7 thoughts on “[Solved] Unity desktop and nautilus not recognizing the Calibre application for .mobi and .epub files

  1. Thank you Neil, this is so usefull. On a side note, I don’t like the Unity Desktop (tried it for a few months) and so I have switched from Ubuntu to Linux Mint.

  2. I’m a Ubuntu 11.10 / Linux newbie so take this with a grain of salt because it may be dangerous and I just don’t realise it. But I found the easiest way to make applications visible via the ‘Open with Other Application / Show Other Applications (when your application is not visible here eg. Calibre / PDF Studio 7) is to:

    1. Find the .desktop file that relates to the application. I found mine in home.local/share/applications. The Calibre one was called ‘calibre.desktop’.

    2. I displayed the properties / permissions for this file and hit the checkbox ‘Allow executing file as program’ and gave myself ‘Read / Write’ access.

    3. I then when back to the ‘Basic’ tab and in the ‘Command’ entry added %f at the end of ‘calibre’ with a space in between. I did the same for PDF Studio and now I can see both as available options when right clicking on a epub / pdf etc file.

    Would appreciate some feedback if this is a bad move.

    Cheers,
    Mike

  3. I tried solution one and was able to set calibre as default application in case of .mobi and .epub files, but then the reader itself stopped working. I wasn’t able to launch calibre at all.
    So after I had set calibre as default in both types of files, I changed calibre.desktop in usr/share/applications back to its original state which solved the issue.

  4. Hi,
    Thanks for this very useful post.
    I have used the 2nd solution in Ubuntu 12.04 LTS and it worked ok; the only thing I had to do was to remove the quotes from Exec=’/usr/bin/calibre’ %f , cause otherwise it said that it cannot find ”/usr/bin/calibre” (double single quotes at the beginnning and end of the path).
    Maybe it’s a copy paste thing and it’s not a single quote in your listing. Maybe backquotes?
    Anyway, it works super. Thanks.

  5. Thanks a bunch, mate! This was indeed a great tip. I’d advise you to maybe create a ticket in Calibre because this is obviously some kind of a bug. I haven’t had such problem with any other application so the problem has to be in a way connected with the installation procedures of Calibre.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s