Betterbird / thunderbird-patches

Betterbird is a fork of Mozilla Thunderbird. Here are the patches that provide all the goodness.
Other
482 stars 20 forks source link

Not advertising x-scheme-handler/mailto #284

Closed LeoniePhiline closed 6 months ago

LeoniePhiline commented 6 months ago

I have read https://github.com/Betterbird/thunderbird-patches#bug-reporting--support.

The issue might be related to #49.

Trying to set Betterbird as default mail application in KDE Plasma 6.

Setting Thunderbird works.

Setting Betterbird does not work by default. Instead, a square button containing an information icon (encircled letter "i") appears. Clicking it announces Betterbird not advertising x-scheme-handler/mailto.

See screenshot:

image

Given that Thunderbird does not cause KDe to announce missing x-scheme-handler/mailto advertisement, I believe this is a Betterbird bug.

Betterbird 115.9.0-bb26 (64-bit)

Betterbird commented 6 months ago

How are you installing and which desktop file are you using? The one we provide advertises x-scheme-handler/mailto: https://github.com/Betterbird/thunderbird-patches/blob/9c4fcb9fe3e649d84cbbf8c777a881f299221cd5/metadata/eu.betterbird.Betterbird.desktop#L8 https://github.com/Betterbird/thunderbird-patches/blob/9c4fcb9fe3e649d84cbbf8c777a881f299221cd5/metadata/eu.betterbird.Betterbird.appdata.xml#L61

The AUR version is a little older but advertises it, too: https://aur.archlinux.org/cgit/aur.git/tree/betterbird.desktop?h=betterbird-bin#n9

LeoniePhiline commented 6 months ago

Thanks for your response!

As there is no packaging for my distribution (OpenSUSE Tumbleweed, using RPM package format), I am running this script as part of my update procedure (TLDR: Download latest release archive, unpack it and move it someplace):

#!/usr/bin/zsh

set -eux

remote_file="https://www.betterbird.eu/downloads/get.php?os=linux&lang=en-US&version=release"
local_file="${HOME}/betterbird-latest.en-US.linux-x86_64.tar.bz2"

modified=$(curl --silent --head --location $remote_file | \
             awk '/^last-modified/{print $0}' | \
             sed 's/^last-modified: //')
remote_ctime=$(date --date="$modified" +%s)

if [ -f "$local_file" ]; then
  local_ctime=$(stat -c %z "$local_file")
  local_ctime=$(date --date="$local_ctime" +%s)
else 
  local_ctime=0  
fi

if [ $local_ctime -lt $remote_ctime ]; then
  curl --output "${local_file}" --location "${remote_file}"

  pushd "$(dirname "${local_file}")"
  tar xjf "${local_file}"
  [[ -d ~/.betterbird ]] && mv ~/.betterbird "$(mktemp -d --suffix=".betterbird")"
  mv betterbird ~/.betterbird
  ln -sf ~/.betterbird/betterbird ~/.local/bin/betterbird
  popd
fi

The betterbird-latest.en-US.linux-x86_64.tar.bz2 archive does not appear to contain a .desktop file. Of course the path to the binary and icon cannot be known in advance.

I must thus have created it manually, linking with /home/leonie/.local/bin/betterbird and one of the ~/.betterbird/chrome/icons/default/ icon files, but without being aware of the fact that I would need to set up the supported mime types myself.

image

Would you by any chance include a Betterbird.desktop template in the betterbird-latest.en-US.linux-x86_64.tar.bz2 archive?

Users could then adjust only the binary and icon paths and have it configured correctly.

Betterbird commented 6 months ago

Yes, the .tar.bz2 doesn't contain a .desktop file (Issue #229).

However, our install script fetches and adjusts it: https://github.com/Betterbird/thunderbird-patches/blob/main/install-on-linux/install-betterbird.sh

You can derive some inspiration from it.

Betterbird commented 5 months ago

Note https://github.com/Betterbird/thunderbird-patches/issues/49#issuecomment-2057810956