mime and web pages

Tony Arnold tony.arnold at manchester.ac.uk
Mon Aug 17 14:24:52 UTC 2020


On Mon, 2020-08-17 at 15:53 +0200, Volker Wysk wrote:

Am Montag, den 17.08.2020, 22:52 +1000 schrieb Karl Auer:

I want to open specific browsers (or more generally, pass specific

URLS

to specific programs) within the Ubuntu desktop.


For example, if I receive an email with a link in it, and click on

that

link, I want to pass that link to a specific program.


I've spent quite  bit of time googling around mime types and so on,

but

everything I find is about opening files, not links. I've also looked

at xdg-open, xdg-settings etc, but I cannot figure out what xdg-open

is

looking at when it decides to run Firefox, either! It's allegedly

mimeapps.list, but it is definitely not using the one in my home

directoy and the others seem to belong to various snaps.


Another way to look it this would be to say I want to substitute my

own

program for Firefox as far as what is used to open links.


Evolution uses a .desktop file for the browser, which it uses for

opening a link in a mail. This is probably Firefox or Chrome. For

Firefox, it's the firefox.desktop file which is consulted.


This can (i believe) be chosen in the "Vorgabeanwendungen" ("default

applications"?) in the system settings. In this file, it is specified

how the default browser should be opened. It is located in

/usr/share/applications and possibly in .local/share/applications. The

second one takes precedence over the first one, so you can replace

system wide ones with private ones.


The firefox.desktop file has, among other things, this entry in about

the middle:


Exec=firefox %u


Here the "%u" should be the URL.


I don't know if you can configure evolution, such that it uses a

program different from the default browser.

From what I've seen, clicking on a link in Evolution opens Chrome (in my case) and then Chrome decides somehow to use xdg-open to open the link/file with another app. For example, I can click on a link to a Zoom meeting and Chrome pops up saying do I want to open it with xdg-open. I don't know how it figures that out.

Regards,
Tony.

--

Tony Arnold MBCS, CITP | Senior IT Security Analyst | Directorate of IT Services | Office 1, Kilburn Building | The University of Manchester | Manchester M13 9PL | T: +44 161 275 6093 | M: +44 773 330 0039
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20200817/afe44f08/attachment.html>


More information about the ubuntu-users mailing list