Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Making thunderbird open links with firefox
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Wed Oct 01, 2014 1:57 pm    Post subject: [SOLVED]Making thunderbird open links with firefox Reply with quote

Hi,

The following problem has been bugging me for ages, and I can't figure out how to fix it, some help would be greatly appreciated.
Links in thunderbird keep opening with links (oke, that's a very weird sentence, but wait let me explain. Links are being opened by the browser with the same name)
All other applications work fine, which I think is weird, all applications work accept the one from the same company :?
I set BROWSER="firefox", in /etc/env.d/02locale , I found this solution on the old wiki, but it didn't work.
next I tried setting user_pref("network.protocol-handler.app.http", "/usr/bin/firefox"); in /home/andrew/.thunderbird/p0gkx4yw.default/prefs.js, and of course the same for ftp and https. but this didn't work either. I also set the default browser in the KDE control panel.
I also tried removing links, but emerge --ask --newuse --deep --with-bdeps=y @world, pulls it back in, for some reason portage wants links installed, which isn't a bad thing, it's just annoying, because thunderbird doesn't want to use firefox.
I'm using firefox 31.0, and thunderbird 31.0 (yes, that's neither the latest from mozilla nor is it the stable version in the gentoo repositories, but I tested other versions as well, and they have the same problem.)

If anybody has any idea how I can fix this, it would be very thankful, it's just so annoying to copy and paste links.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400


Last edited by AndrewAmmerlaan on Tue Oct 14, 2014 4:20 pm; edited 3 times in total
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Wed Oct 01, 2014 2:32 pm    Post subject: Reply with quote

Take a look at /usr/share/applications/mimeinfo.cach file. It sets applications for different actions, including x-scheme-handler/http.
I have it set to Links browser too, but since I have no it installed, next in line app (firefox) being used to open links.
Regarding Links browser: add it to package.mask, or use --exclude option on world update to prevent installing it back.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Wed Oct 01, 2014 2:34 pm    Post subject: Re: Making thunderbird open links with firefox Reply with quote

Edit => Preferences => Attachments, scroll down until http and https. Both select Firefox.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Wed Oct 01, 2014 2:50 pm    Post subject: Reply with quote

creaker wrote:
Take a look at /usr/share/applications/mimeinfo.cach file. It sets applications for different actions, including x-scheme-handler/http.
I have it set to Links browser too, but since I have no it installed, next in line app (firefox) being used to open links.
Regarding Links browser: add it to package.mask, or use --exclude option on world update to prevent installing it back.


http and https is set to:
x-scheme-handler/http=links_-g_%u-links-2.desktop;firefox.desktop;
x-scheme-handler/https=links_-g_%u-links-2.desktop;firefox.desktop;

Quote:
Edit => Preferences => Attachments, scroll down until http and https. Both select Firefox.

the attachments tab is empty, there's a search bar, and bellow a box which contains nothing. is there some way to add stuff to it?

[EDIT]
oke, so what I did is, I changed
x-scheme-handler/http=links_-g_%u-links-2.desktop;firefox.desktop;
to
x-scheme-handler/http=firefox.desktop;links_-g_%u-links-2.desktop;
and that worked.

Thanks for your help, this makes life so much easier
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400


Last edited by AndrewAmmerlaan on Wed Oct 01, 2014 2:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Wed Oct 01, 2014 2:58 pm    Post subject: Reply with quote

AndrewAmmerlaan wrote:

http and https is set to:
x-scheme-handler/http=links_-g_%u-links-2.desktop;firefox.desktop;
x-scheme-handler/https=links_-g_%u-links-2.desktop;firefox.desktop;

change it to
Code:

x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Wed Oct 01, 2014 2:59 pm    Post subject: Reply with quote

Thanks for the help, I really appreciate it. :D
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Sat Oct 11, 2014 2:05 pm    Post subject: Reply with quote

Turns out it's not as solved as I thought it was, apparently mimeinfo.cache gets regenerated sometimes, and it reverts to the value it was before I changed it, is there some way to make the changes permanent, or maybe change the value mimeinfo.cache gets reverted to?
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Mon Oct 13, 2014 4:15 pm    Post subject: Reply with quote

So I checked several wikis, and added:
/usr/share/applications/mimeapps.info
and put the http and https rules in it, but it didn't work, anyone know what to do?
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 422

PostPosted: Mon Oct 13, 2014 6:27 pm    Post subject: Reply with quote

I had similar problems getting firefox to open PDF's and directories with the applications I wanted. I created/edited the file mimeapps.list, both in /usr/share/applications and ~/.local/share/applications:

Code:
[Added Assocations]
inode/directory=kde4-dolphin.desktop;kde4-kfmclient_dir.desktop;
application/pdf=kde4-active-documentviewer_pdf.desktop;kde4-okularApplication_pdf.desktop;zzz-gimp.desktop;
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Mon Oct 13, 2014 9:41 pm    Post subject: Reply with quote

Clicking on links in Thunderbird launches Firefox in my KDE 4.14.1 installation. Below are a few excerpts from files in my installation, in case they are of help to you.

The file ~/.local/share/applications/mimeapps.list includes:

Code:
application/x-extension-htm=userapp-Firefox-4MNXBX.desktop;
application/x-extension-html=userapp-Firefox-4MNXBX.desktop;
application/x-extension-shtml=userapp-Firefox-4MNXBX.desktop;
application/x-extension-xht=userapp-Firefox-4MNXBX.desktop;
application/x-extension-xhtml=userapp-Firefox-4MNXBX.desktop;
application/xhtml+xml=userapp-Firefox-4MNXBX.desktop;
text/html=google-chrome.desktop;userapp-Firefox-4MNXBX.desktop;kde4-kfmclient_html.desktop;firefox.desktop;kde4-kwrite.desktop;kde4-kate.desktop;emacsclient.desktop;emacs.desktop;wine-extension-txt.desktop;kde4-okularApplication_txt.desktop;
x-scheme-handler/chrome=userapp-Firefox-4MNXBX.desktop;
x-scheme-handler/ftp=userapp-Firefox-4MNXBX.desktop;
x-scheme-handler/http=userapp-Firefox-4MNXBX.desktop;
x-scheme-handler/https=userapp-Firefox-4MNXBX.desktop;
application/x-extension-htm=userapp-Firefox-4MNXBX.desktop
application/x-extension-html=userapp-Firefox-4MNXBX.desktop
application/x-extension-shtml=userapp-Firefox-4MNXBX.desktop
application/x-extension-xht=userapp-Firefox-4MNXBX.desktop
application/x-extension-xhtml=userapp-Firefox-4MNXBX.desktop
application/xhtml+xml=userapp-Firefox-4MNXBX.desktop
x-scheme-handler/chrome=userapp-Firefox-4MNXBX.desktop
x-scheme-handler/ftp=userapp-Firefox-4MNXBX.desktop
x-scheme-handler/http=userapp-Firefox-4MNXBX.desktop
x-scheme-handler/https=userapp-Firefox-4MNXBX.desktop

and
Code:
message/rfc822=kde4-kmail_view.desktop;seamonkey.desktop;kde4-kwrite.desktop;qgo.desktop;kde4-kate.desktop;wine-extension-txt.desktop;
text/x-ms-iqy=wine-Programs-Microsoft Office-Microsoft Office Excel 2007.desktop;kde4-kwrite.desktop;kde4-KMail.desktop;writer.desktop;qgo.desktop;kde4-kate.desktop;emacsclient.desktop;emacs.desktop;wine-extension-txt.desktop;
x-scheme-handler/mailto=userapp-Thunderbird-R0X42V.desktop;
x-scheme-handler/mailto=userapp-Thunderbird-R0X42V.desktop

and
Code:
application/rss+xml=userapp-Thunderbird-R0X42V.desktop;
application/x-extension-rss=userapp-Thunderbird-R0X42V.desktop;
x-scheme-handler/feed=userapp-Thunderbird-R0X42V.desktop;
x-scheme-handler/mailto=userapp-Thunderbird-R0X42V.desktop;
x-scheme-handler/news=userapp-Thunderbird-R0X42V.desktop;
application/rss+xml=userapp-Thunderbird-R0X42V.desktop
application/x-extension-rss=userapp-Thunderbird-R0X42V.desktop
x-scheme-handler/feed=userapp-Thunderbird-R0X42V.desktop
x-scheme-handler/mailto=userapp-Thunderbird-R0X42V.desktop
x-scheme-handler/news=userapp-Thunderbird-R0X42V.desktop

The file ~/.thunderbird/gwer7hms.default/mimeTypes.rdf includes:

Code:
  <RDF:Description RDF:about="urn:scheme:handler:https"
                   NC:useSystemDefault="true"
                   NC:alwaysAsk="false">
    <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/firefox"/>
    <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/google-chrome-stable"/>
    <NC:externalApplication RDF:resource="urn:scheme:externalApplication:https"/>
  </RDF:Description>

and
Code:
  <RDF:Description RDF:about="urn:handler:local:/usr/bin/firefox"
                   NC:prettyName="firefox"
                   NC:path="/usr/bin/firefox" />

and
Code:
 <RDF:Description RDF:about="urn:scheme:handler:http"
                   NC:useSystemDefault="true"
                   NC:alwaysAsk="false">
    <NC:possibleApplication RDF:resource="urn:handler:local:/opt/bin/acroread"/>
    <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/firefox"/>
    <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/konqueror"/>
    <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/google-chrome-stable"/>
    <NC:externalApplication RDF:resource="urn:scheme:externalApplication:http"/>
  </RDF:Description>


EDIT Tue 14 Oct 00:16:47 BST 2014 You may find this useful too: Changing the Default Browser in Thunderbird on Linux.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Tue Oct 14, 2014 7:30 am    Post subject: Reply with quote

Apheus wrote:
I had similar problems getting firefox to open PDF's and directories with the applications I wanted. I created/edited the file mimeapps.list, both in /usr/share/applications and ~/.local/share/applications:

Code:
[Added Assocations]
inode/directory=kde4-dolphin.desktop;kde4-kfmclient_dir.desktop;
application/pdf=kde4-active-documentviewer_pdf.desktop;kde4-okularApplication_pdf.desktop;zzz-gimp.desktop;


yeah, that's a typo, it should have been .list instead of .info, I have added the firefox entries under [Default Applications], according to several wiki's this should make firefox preferred over links, however I didn't have the firefox entries in ~/.local/share/applications/mimeapps.list, I only had them in /usr/share/applications/mimeapps.list, therefore, I made sure bought files, had the same contents, I hope it works now, but I'm not sure because the problem was that the settings I set in mimeapps.list were overridden by mimeinfo.cache, and for some reason this file reverts sometimes. I looked a little closer to these files and noticed that

mimeinfo.cache
image/jpeg=kde4-kolourpaint.desktop;kde4-okularApplication_kimgio.desktop;kde4-active-documentviewer_kimgio.desktop;kde4-gwenview.desktop;zzz-gimp.desktop;
mimeapps.list
[Added Associations]
image/jpeg=zzz-gimp.desktop;kde4-gwenview.desktop;kde4-kolourpaint.desktop;kde4-okularApplication_kimgio.desktop;

and jpeg images open with gimp, so maybe I should add the firefox rules to [added assocations], but that doesn't make sense, I want to set a default not add something??
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Oct 14, 2014 7:33 am    Post subject: Reply with quote

Apheus wrote:
I had similar problems getting firefox to open PDF's and directories with the applications I wanted. I created/edited the file mimeapps.list, both in /usr/share/applications and ~/.local/share/applications:
What do you have in Thunderbird's preferences for pdf? http://imgur.com/Vqku2ex

Last edited by charles17 on Tue Oct 14, 2014 8:46 am; edited 1 time in total
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Tue Oct 14, 2014 7:59 am    Post subject: Reply with quote

AndrewAmmerlaan wrote:
maybe I should add the firefox rules to [added assocations], but that doesn't make sense, I want to set a default not add something??

It does make sense, because, when I use the xdg-mime command to add an entry to ~/.local/share/applications/mimeapps.list, it adds two entries: one at the bottom of the existing list under [Added Associations] and the second entry at the bottom of the existing list under [Default Applications].
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Tue Oct 14, 2014 11:29 am    Post subject: Reply with quote

Fitzcarraldo wrote:
AndrewAmmerlaan wrote:
maybe I should add the firefox rules to [added assocations], but that doesn't make sense, I want to set a default not add something??

It does make sense, because, when I use the xdg-mime command to add an entry to ~/.local/share/applications/mimeapps.list, it adds two entries: one at the bottom of the existing list under [Added Associations] and the second entry at the bottom of the existing list under [Default Applications].


So all I have to do is copy the rules I set for http and https to [Added Assocations], and it should work. I'll try this a soon as I get home.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Tue Oct 14, 2014 12:38 pm    Post subject: Reply with quote

AndrewAmmerlaan wrote:
So all I have to do is copy the rules I set for http and https to [Added Assocations], and it should work. I'll try this a soon as I get home.

Should do. Don't forget that there are a lot more associations for Firefox than just http and https, though. See the lists in my post yesterday, which I generated using the commands:

Code:
$ cat ~/.local/share/applications/mimeapps.list | grep -i firefox
$ cat ~/.local/share/applications/mimeapps.list | grep -i mail
$ cat ~/.local/share/applications/mimeapps.list | grep -i thunderbird

Notice there are some duplicate lines in each list I posted, because some of the entries are under both [Added Associations] and [Default Applications].

Apparently the proper way to add associations is to use the xdg-mime command, because the xdg-mime command takes care of adding multiple entries to the mimeapps.list file when required. For example:

Code:
$ xdg-mime default kde4-dolphin.desktop inode/directory
$ xdg-mime default firefox.desktop x-scheme-handler/http
$ xdg-mime default firefox.desktop x-scheme-handler/https
$ xdg-mime default firefox.desktop text/html

and so on (see all of them listed in my post yesterday).

BTW, according to an article in the Arch Wiki, one should not edit the files /usr/local/share/applications/mimeinfo.cache and /usr/share/applications/mimeinfo.cache:

Quote:
These files keep track of which MIME-types are associated with which .desktop files overall. This file should not be edited by the user.

https://wiki.archlinux.org/index.php/Changing_filetype_association_via_MIME
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Tue Oct 14, 2014 1:28 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
BTW, according to an article in the Arch Wiki, one should not edit the files /usr/local/share/applications/mimeinfo.cache and /usr/share/applications/mimeinfo.cache:

Quote:
These files keep track of which MIME-types are associated with which .desktop files overall. This file should not be edited by the user.

https://wiki.archlinux.org/index.php/Changing_filetype_association_via_MIME


I would think it would use your local one first ~/.local/share/applications/mimeinfo.cache
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland


Last edited by Anon-E-moose on Tue Oct 14, 2014 4:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 262
Location: Nijmegen

PostPosted: Tue Oct 14, 2014 4:19 pm    Post subject: Reply with quote

Thanks for the help, I'm very happy links are opening with firefox now :), I really appreciate you guys spending your time helping me.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 422

PostPosted: Tue Oct 14, 2014 4:36 pm    Post subject: Reply with quote

charles17 wrote:
What do you have in Thunderbird's preferences for pdf? http://imgur.com/Vqku2ex


I have linked it to xdg-open there. I nearly never get pdf's per mail, I don't remember when I did this. Firefox always forgot the according setting after selecting "Save document" on download, if I wanted to open the document from the download history after saving.
Back to top
View user's profile Send private message
muhsinzubeir
l33t
l33t


Joined: 29 Sep 2007
Posts: 948
Location: /home/muhsin

PostPosted: Sat May 30, 2015 12:53 pm    Post subject: Reply with quote

creaker wrote:
Take a look at /usr/share/applications/mimeinfo.cach file. It sets applications for different actions, including x-scheme-handler/http.
I have it set to Links browser too, but since I have no it installed, next in line app (firefox) being used to open links.
Regarding Links browser: add it to package.mask, or use --exclude option on world update to prevent installing it back.


Thanks changing the cache file does the trick and I can confirm that changing pref.js only it get overwritten.... :?
_________________
~x86
p5k-se
Intel Core 2 Duo
Nvidia GT200
http://www.zanbytes.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum