‘Alternatives’ on Debian-based systems

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
Mæstro
Lunatic
Lunatic
Posts: 463
Joined: 2019-08-13, 00:30
Location: Casumia

‘Alternatives’ on Debian-based systems

Unread post by Mæstro » 2023-03-07, 02:49

If you are using a Debian-based distro, you might want to inform update-alternatives about the presence of Pale Moon (and make it available as x-www-browser and gnome-www-browser). An arbitrary score of 100 has been used here, but you can adjust it according to your needs[.]
Would this bit let me set Pale Moon (through Pusser’s package) as a recognised browser in the case I will describe here? LibreOffice lists one of Chromium, Firefox (ESR or release), Konqueror or Epiphany as a dependency, for it has HTML help files. Uninstalling Epiphany automatically installs Firefox ESR, which is annoying.
Browser: Pale Moon (Pusser’s repository for Debian)
Operating System: Linux Mint Debian Edition 4 (amd64)
※Receiving Debian 10 LTS security upgrades
Hardware: HP Pavilion DV6-7010 (1400 MHz, 6 GB)
Formerly user TheRealMaestro: æsc is the best letter.

User avatar
stevenpusser
Project Contributor
Project Contributor
Posts: 903
Joined: 2015-08-01, 18:33

Re: ‘Alternatives’ on Debian-based systems

Unread post by stevenpusser » 2023-03-15, 22:13

My Pale Moon automatically registers itself into the alternatives system when installed, and removes itself when uninstalled.
I basically copied it from the way that Firefox does the same, as I'm no sooper-genius.

debian/palemoon.postinst

Code: Select all

#!/bin/sh -e

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] ; then
    update-alternatives --install /usr/bin/gnome-www-browser \
        gnome-www-browser /usr/bin/palemoon 40

    update-alternatives --install /usr/bin/x-www-browser \
        x-www-browser /usr/bin/palemoon 40
fi

#DEBHELPER#
So it is politely using a 40 priority.

User avatar
Pentium4User
Board Warrior
Board Warrior
Posts: 1111
Joined: 2019-04-24, 09:38

Re: ‘Alternatives’ on Debian-based systems

Unread post by Pentium4User » 2023-03-16, 05:36

Mæstro wrote:
2023-03-07, 02:49
LibreOffice lists one of Chromium, Firefox (ESR or release), Konqueror or Epiphany as a dependency, for it has HTML help files. Uninstalling Epiphany automatically installs Firefox ESR, which is annoying.
Dependencies for a specific package need that specific packages, they don't care about alternatives.
The alternative system is intended to provide an application for specific commands like "editor". Hard dependencies don't care if a alternative for such a command exists.
The profile picture shows my Maico EC30 E ceiling fan.

User avatar
Mæstro
Lunatic
Lunatic
Posts: 463
Joined: 2019-08-13, 00:30
Location: Casumia

Re: ‘Alternatives’ on Debian-based systems

Unread post by Mæstro » 2023-03-16, 18:07

Aye, this question is about how to add a hard dependency (presumably in Aptitude); Cinnamon’s GUI makes it easy enough to add Pale Moon as an alternative, as I indeed have it as an image viewer. Epiphany and Konqueror are good secondary browsers for those sites which fail in Pale Moon, so it might be pointless to do this.
Browser: Pale Moon (Pusser’s repository for Debian)
Operating System: Linux Mint Debian Edition 4 (amd64)
※Receiving Debian 10 LTS security upgrades
Hardware: HP Pavilion DV6-7010 (1400 MHz, 6 GB)
Formerly user TheRealMaestro: æsc is the best letter.

Locked