Cannot make Firefox (Ubuntu version) default

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
krow7
Level 3
Level 3
Posts: 106
Joined: Thu Apr 17, 2014 7:08 am

Cannot make Firefox (Ubuntu version) default

Post by krow7 »

Hi!

I have installed LM 17.3 recently. Before that I had 17.2.

In the previous version I had Firefox package pinned in the - /etc/apt/preferences.d/official-package-repositories.pref.
With this addition to the file -

Code: Select all

Package: firefox*
Pin: release o=Ubuntu
Pin-Priority: 700
For some reason the /etc/apt/preferences.d/official-package-repositories.pref keeps resetting with every reboot... Any ideas how this can be fixed?

Thanks!
User avatar
xenopeek
Level 25
Level 25
Posts: 25231
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Cannot make Firefox (Ubuntu version) default

Post by xenopeek »

There's no reason to put those specifically in the /etc/apt/preferences.d/official-package-repositories.pref file. Just create your own preferences file. Say create the file /etc/apt/preferences.d/firefox-ubuntu.pref and don't forget you want the priority higher than Linux Mint's import repository. So make it 701.

Code: Select all

Package: firefox*
Pin: release o=Ubuntu
Pin-Priority: 701
Update Manager might not offer you to install Ubuntu's Firefox, if it's not a newer version than Linux Mint's. In that case you'll have to one time explicitly install Firefox from Ubuntu's repositories. Check which Firefox packages you have installed for example with (for me it is firefox and firefox-locale-en):

Code: Select all

dpkg -l firefox*
Then reinstall those packages explicitly from Ubuntu's repositories with:

Code: Select all

apt install -t trusty firefox firefox-locale-en
You can check with the following command where Firefox was installed from and whether you've set pin priority correct:

Code: Select all

apt policy firefox
Image
Elizine
Level 1
Level 1
Posts: 29
Joined: Wed Feb 10, 2016 11:29 pm

Re: Cannot make Firefox (Ubuntu version) default

Post by Elizine »

Try the following commands -
<commands removed by admin>

The second command asked me a few questions about differences in configuration files (e.g. /etc/issue and /etc/issue.net). Answer Y to all of them to install the version from the new package.

After both commands finish successfully, the Linux Mint Update Manager will running fine again.
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: Cannot make Firefox (Ubuntu version) default

Post by Cosmo. »

This is a bad advice in double sense:

At first it ignores the update level system of the update manager. It may break things on a system because of regressions.

At second, because aptitude uses a different package database than the update manager / software manager / synaptic / apt. This also can lead into troubles.
krow7
Level 3
Level 3
Posts: 106
Joined: Thu Apr 17, 2014 7:08 am

Re: Cannot make Firefox (Ubuntu version) default

Post by krow7 »

xenopeek wrote:There's no reason to put those specifically in the /etc/apt/preferences.d/official-package-repositories.pref file. Just create your own preferences file. Say create the file /etc/apt/preferences.d/firefox-ubuntu.pref and don't forget you want the priority higher than Linux Mint's import repository.
Wow, thanks Xenopeek!!! I didn't know that I could create a custom .pref files.
Do you know why the official-package-repositories.pref is being reset in LM 17.3?

And I didn't know that one could use apt directly!

Code: Select all

apt install ....
apt policy ....
Always used apt-get and apt-cache.
Today is a day of discoveries for me! :D
User avatar
xenopeek
Level 25
Level 25
Posts: 25231
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Cannot make Firefox (Ubuntu version) default

Post by xenopeek »

Type "apt" on the terminal to see a list of commands it supports. You don't need to prefix it with sudo as it does that automatically for actions that need it. This is Linux Mint's apt command BTW, which predates the apt command Debian later added. To use Debian's apt you'd have to specify the full path /usr/bin/apt to use it (and that will require sudo prefix for most actions, and it supports but a fraction of the commands Linux Mint's apt command offers).
Image
Post Reply

Return to “Software & Applications”