Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-24-2011, 09:04 AM   #1
sej7278
Enthusiast
sej7278 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Mar 2011
Device: Android
Calibre associated with every filetype?!

How is Calibre setting up its file associations on Linux, as I'd really like to undo them all and just associate with .epub and .mobi

At the moment it seems to associate itself with all filetypes - from .txt to .rb and even CHECKSUM files!

I've seen a related issue on Gentoo, but this is Fedora and I'm using the binary installer not a package:

http://forums.gentoo.org/viewtopic-t...8-start-0.html
sej7278 is offline   Reply With Quote
Old 05-24-2011, 09:28 AM   #2
sej7278
Enthusiast
sej7278 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Mar 2011
Device: Android
seems there's a shedload of entries in /usr/local/share/applications/defaults.list and various .desktop files in that directory which are causing the problem.
sej7278 is offline   Reply With Quote
Old 05-24-2011, 12:51 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre does not associate itself with anything, what it does is tell your OS that it is capable of handling a set of mimetypes, as you will see in the calibre*.desktop files. After that, what application the OS associates with each mimetype is up to it. You need to find out how to edit those associations for the programs/desktop environments you use.
kovidgoyal is offline   Reply With Quote
Old 05-24-2011, 01:00 PM   #4
sej7278
Enthusiast
sej7278 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Mar 2011
Device: Android
well its pretty much the same thing!

i fixed it by removing all the mimetypes except the mobi/epub ones from the calibre*.desktop files and defaults.list and running update-mime-database

i'm still not sure how calibre and ebook-viewer was listed as a mimetype handler for almost every format i tested - probably had text/plain or application/binary in there somewhere....
sej7278 is offline   Reply With Quote
Old 05-24-2011, 01:13 PM   #5
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by sej7278 View Post
i'm still not sure how calibre and ebook-viewer was listed as a mimetype handler for almost every format i tested - probably had text/plain or application/binary in there somewhere....
Calibre and the ebook-veiwer support a large number of formats. Plain text is a supported format.
user_none is offline   Reply With Quote
Old 08-07-2011, 07:11 PM   #6
sej7278
Enthusiast
sej7278 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Mar 2011
Device: Android
Quote:
Originally Posted by kovidgoyal View Post
calibre does not associate itself with anything, what it does is tell your OS that it is capable of handling a set of mimetypes, as you will see in the calibre*.desktop files. After that, what application the OS associates with each mimetype is up to it. You need to find out how to edit those associations for the programs/desktop environments you use.
can we make it so this isn't the default behaviour?

i get fed up of editing /usr/share/applications/calibre* (as well as defaults.list and mimeinfo.cache) every time i upgrade calibre.

i mean its fair enough to associate with mobi and epub files, but do you really need to become the default handler for msword, html, pdf etc?

the clean way to do it would be to allow a user to associate filetypes they want to either via their file manager (in ~/.local/share/applications) or as an option in calibre (thats not enabled by default) not try to overtake 20-odd filetypes for every user on a computer.

otherwise could you at least make it so that calibre adds its entries to the end of the mimetypes and not the start, so it doesn't override other handlers that are already setup - for instance taking over from libreoffice as the default msword handler or chrome as the default html handler?
sej7278 is offline   Reply With Quote
Old 08-07-2011, 07:54 PM   #7
jgaiser
Omnivorous
jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.
 
jgaiser's Avatar
 
Posts: 3,281
Karma: 27978909
Join Date: Feb 2008
Location: Rural NW Oregon
Device: Kindle Voyage, Kindle Fire HD, Kindle 3, KPW1
I'm curious what distribution you're using. I'm using Ubuntu 10.04 and Calibre definitely does not change the mime types for either msword files, html files or txt files. All are opened in the correct, appropriate applications.
jgaiser is offline   Reply With Quote
Old 08-08-2011, 12:34 AM   #8
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by sej7278 View Post
Quote:
Originally Posted by kovidgoyal View Post
calibre does not associate itself with anything, what it does is tell your OS that it is capable of handling a set of mimetypes, as you will see in the calibre*.desktop files. After that, what application the OS associates with each mimetype is up to it. You need to find out how to edit those associations for the programs/desktop environments you use.
can we make it so this isn't the default behaviour?
As already stated this isn't the default behavior.

Quote:
Originally Posted by sej7278 View Post
i get fed up of editing /usr/share/applications/calibre* (as well as defaults.list and mimeinfo.cache) every time i upgrade calibre.
I would be fed up too. It will be interesting to know why, on Fedora, you have to do this. I would love to hear from other Fedora users their experience.

Quote:
Originally Posted by sej7278 View Post
not try to overtake 20-odd filetypes for every user on a computer.
The behavior you see on your system doesn't happen in Windows or Mac OSes and I'm willing to bet the vast majority of Linux users don't experience this behavior either.

Good Luck in identifying and getting corrected the cause of your system allowing the identifying of mime types to automatically cause an association.
DoctorOhh is offline   Reply With Quote
Old 08-08-2011, 01:02 AM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,688
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Does not happen on Ubuntu using the Binary install
theducks is offline   Reply With Quote
Old 08-08-2011, 03:28 AM   #10
sej7278
Enthusiast
sej7278 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Mar 2011
Device: Android
Quote:
Originally Posted by jgaiser View Post
I'm curious what distribution you're using. I'm using Ubuntu 10.04 and Calibre definitely does not change the mime types for either msword files, html files or txt files. All are opened in the correct, appropriate applications.
for fedora, gentoo and debian this is the default behaviour for binary install.

seems like ubuntu is the only distro this isn't happening on.

Last edited by sej7278; 08-08-2011 at 03:34 AM.
sej7278 is offline   Reply With Quote
Old 08-08-2011, 07:20 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by sej7278 View Post
can we make it so this isn't the default behaviour?
Once again: calibre does not set itself as the default handler for any file type, on any operating system. I absolutely detest programs that do that.

On linux calibre uses the freedesktop.org recommend tools, xdg-mime and xdg-desktop-menu to tell your desktop of the mimetypes it is capable of handling. If your desktop environment chooses to then make it the default, over your objections, then your desktop environment's implementation of xdg-mime and xdg-desktop-menu is broken, and you should open a bug report with your distro maintainers.

If you don't believe me, feel free to examine the calibre source code, the relevant portion is the function setup_desktop_integration() in src/calibre/linux.py.

Last edited by kovidgoyal; 08-08-2011 at 08:25 PM.
kovidgoyal is offline   Reply With Quote
Old 08-09-2011, 04:42 AM   #12
sej7278
Enthusiast
sej7278 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Mar 2011
Device: Android
so do i open bug reports with fedora (13/14/15), debian (6/7) and gentoo, or just gnome (2/3) and kde4?
sej7278 is offline   Reply With Quote
Old 08-09-2011, 09:49 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This is one of those things that requires co-operation between different projects to work. It's why it is still broken after all this time. If I were you I'd try distro level bug reports first.
kovidgoyal is offline   Reply With Quote
Old 08-09-2011, 10:22 AM   #14
jgaiser
Omnivorous
jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.
 
jgaiser's Avatar
 
Posts: 3,281
Karma: 27978909
Join Date: Feb 2008
Location: Rural NW Oregon
Device: Kindle Voyage, Kindle Fire HD, Kindle 3, KPW1
Quote:
Originally Posted by sej7278 View Post
so do i open bug reports with fedora (13/14/15), debian (6/7) and gentoo, or just gnome (2/3) and kde4?
Or switch to Ubuntu...
jgaiser is offline   Reply With Quote
Old 08-09-2011, 10:36 AM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,688
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by jgaiser View Post
Or switch to Ubuntu...
That has to be a first (the reverse is commonly stated )
"Switch to Ubuntu because everyone else is doing it wrong!"
theducks is offline   Reply With Quote
Reply

Tags
association, file association, filetype, linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zip Filetype Plugin? rsingley Plugins 7 02-11-2011 05:11 PM
How install Calibre & Calibre Library where I choose? akmatov Calibre 3 01-17-2011 08:36 PM
Kindle and Calibre user with problem importing large library into Calibre pleabargain Calibre 1 12-07-2010 10:19 AM
How to register a filetype? plisken iRex 2 09-28-2009 07:16 AM
calibre command line utilities and calibre defaults astrodad Calibre 2 08-07-2008 03:27 PM


All times are GMT -4. The time now is 05:35 AM.


MobileRead.com is a privately owned, operated and funded community.