Re: preferred app question

On 2014.11.12 17:28, Peter Bloomfield wrote:
Hi Jack!

On Nov 12, 2014, at 11:10 AM, Jack wrote:
I'm replying to this ancient thread because this problem just happened again, and I want to record getting the solution someplace where others might be able to find it.

In my case, I'm running a KDE system on Gentoo, so I only have the absolutely minimally necessary gnome libraries installed. I do not use systemd, so I actually can't use any of the Gnome UI tools, such as Nautilus or Gnome-control-panel (or whatever the name really is.) Everything had been fine, while I was using Firefox as my primary browser, with several others also installed. However, I recently uninstalled firefox, and installed firefox-bin. (For those who don't know, Gentoo is a source based distro, but sometimes it's easier to install a pre-compiled version.) I suppose in order to allow one to have both firefox and firefox-bin installed at the same time, all references to those apps are different, so the -bin is not simply a drop-in replacement.

Symptom - when I right click on an html part in a message part list, firefox-bin was the first app listed. However, clicking on any URL within a message opened it in Opera. Right clicking on the link and selecting copy link worked, but is a nuisance, especially since I generally just clicked first.

Solution - after hunting through many google results, I finally was led to /usr/share/applications/mime.cache. I hunted for every line referring to opera, and moved that reference to after any mention of firefox-bin. Not sure why that worked, and similar edit to ~/.local/share/applications/mime.cache did not, but perhaps that's just a quirk of my setup.

Anyway - I'm not happy again.

So sorry to see that!

Ouch. I really did mean to say "Anyway - I'm now happy again" (NOW, not NOT) because I figured out how to fix it - regardless of what actually caused it. I did not mean to imply I was unhappy to get caught in such a convoluted mess. That was a plain typo - unfortunately, I can't blame it on any auto-correct. Well, I could, but ...

The reason for the different treatment is that when you click on a link, Balsa calls gtk_show_uri(), whereas the pop-up menu of alternatives that you get by right-clicking on the part list uses GAppInfo (specifically g_app_info_get_default_for_type() and g_app_info_get_all_for_type()) to find the supported actions for a part with the given content-type, here text/html. The top item in the menu is the one returned by g_app_info_get_default_for_type(), and that seems to have been firefox-bin, but gtk_show_uri() must have a different idea of the appropriate action.

I don't think Balsa can do anything different, as the two situations (showing a URI, and opening a text/html part) could easily require different actions, so it seems to make sense to allow the libraries to respond as they think fit. But I guess they could be less opaque in the information that they use to make those decisions.
An app like balsa can tell me what call it uses in a given situation, but tracking down how that call eventually decides what to return is where I get lost. Some things DE (gnome vs KDE for example), some things distro specific, system defaults, a variety of user overrides. .desktop files which say what a given app can handle, but other files (I've seen references to both mime.cache and defaults.something - and don't know if they switched over time or are competing setups...)

In my case, somehow, opera was at or near the beginning of many of the lists in the file I edited - not sure how or why, and not sure if there is any reasonable GUI for that file, or if it's just all behind the scenes when stuff gets installed or uninstalled. It's also obviously (at least to me) more confusing because I only have snippets of gnome installed.

Anyway, my post was to get into the record the file I found that actually helped me get balsa to do what I want.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]