Bug 151314 - Please support e-mail client Betterbird (Thunderbird fork) for sending documents
Summary: Please support e-mail client Betterbird (Thunderbird fork) for sending documents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.4.1.2 release
Hardware: All Linux (All)
: medium enhancement
Assignee: mfs
URL:
Whiteboard: target:7.5.0 target:7.4.3
Keywords:
Depends on:
Blocks: File-Send
  Show dependency treegraph
 
Reported: 2022-10-03 17:37 UTC by Jorg K
Modified: 2022-10-10 17:13 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
add Betterbird to the list of Thunderbird-like mail clients (794 bytes, patch)
2022-10-07 17:47 UTC, mfs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorg K 2022-10-03 17:37:03 UTC
Description:
Please support e-mail client Betterbird (Thunderbird fork): Change
https://github.com/LibreOffice/core/blob/master/shell/source/unix/misc/senddoc.sh
and add the Betterbird executable

Steps to Reproduce:
Send the document your editing in Writer via mail when Betterbird is the configured mail client.

Actual Results:
Document not attached.

Expected Results:
Document should be attached.


Reproducible: Always


User Profile Reset: No



Additional Info:
Hi, I'm the maintainer of Betterbird, https://www.betterbird.eu/.
We ship Betterbird also for Linux and there are Arch packages
(https://aur.archlinux.org/packages?O=0&SeB=nd&K=betterbird&outdated=&SB=p&SO=d&PP=50&submit=Go) and a Flatpak (https://flathub.org/apps/details/eu.betterbird.Betterbird).

For integration with LO it would be nice if you could adjust
https://github.com/LibreOffice/core/blob/master/shell/source/unix/misc/senddoc.sh
at least at lines 83 and 364, look for Thunderbird.

Also, in case you get complaints that documents can't be passed to Thunderbird 102, that's due to
https://bugzilla.mozilla.org/show_bug.cgi?id=1793323
That will get fixed soon.
We're tracking the issue here:
https://github.com/Betterbird/thunderbird-patches/issues/85
Comment 1 Rafael Lima 2022-10-04 00:04:24 UTC
Hi Jorg,

I think the fastest way to get this into LO would be for you to create your own patch including Betterbird support.

Here's where you'll find more info about that:
https://wiki.documentfoundation.org/Development
Comment 2 Jorg K 2022-10-04 08:09:42 UTC
(In reply to Rafael Lima from comment #1)
> I think the fastest way to get this into LO would be for you to create your
> own patch including Betterbird support.

I'll see whether I can prepare a patch for the script after testing it locally. I won't be getting into LO development.
Comment 3 Heiko Tietze 2022-10-04 10:58:32 UTC
Thought the supposed way to go is via Tools > Options > Internet > Email. But no objection if you add some mechanism for auto detection (guess it is what the mentioned lines do). 

Would be even more fun to integrate such an email client into the office suite.
Comment 4 Heiko Tietze 2022-10-04 11:00:47 UTC
(In reply to Heiko Tietze from comment #3)
> Would be even more fun to integrate such an email client into the office
> suite.

See bug 96192
Comment 5 Jorg K 2022-10-04 11:23:05 UTC
(In reply to Heiko Tietze from comment #3)
> Thought the supposed way to go is via Tools > Options > Internet > Email.
> But no objection if you add some mechanism for auto detection (guess it is
> what the mentioned lines do). 

Sorry, I have an older version 6.4.7.2. The entry in "Tools > Options > Internet > Email" doesn't seem to have any effect. It's also not clear which parameters LO provides. I tried:
/home/jorgk/Desktop/betterbird102/betterbird -compose "attachment='%s'" hoping that %s might be the attachment name. Or perhaps it's a string à la $2 here:
https://github.com/LibreOffice/core/blob/master/shell/source/unix/misc/senddoc.sh#L65
That would be something like
to='',cc='',bcc='',attachment='file:///home/xxxxx/Desktop/betterbird/application.ini',subject='noname'
So maybe `-compose %s` would be the correct configuration.

But anyway, the "Tools > Options > Internet > Email" doesn't seem to have any effect, it still launches TB. What does have an effect is changing the "Preferred Application" for mail in Mint/Xfce, sadly the effect is that TB isn't started any more and instead nothing happens. It's also not clear what should be entered into the Mint/Xfce box, `/home/jorgk/Desktop/betterbird102/betterbird` doesn't do the trick.

I still haven't worked out a) where the changes are stored in some config file and b) how LO accesses that file. Looks like LO does access that configuration while ignoring its own, but it must decide that BB wasn't configured correctly.

In short, currently no manual config I tried will make LO launch BB.
Comment 6 Heiko Tietze 2022-10-04 11:43:05 UTC
(In reply to Jorg K from comment #5)
> Sorry, I have an older version 6.4.7.2.

That's five major releases behind the current.

I remember a recent discussion but cannot find it. Anyway, on Arch Linux / KDE I get thunderbird.desktop in this field. Changing the system default to something else brings it into this dialog after the next program restart (Kate, picked just some random application, becomes org.kde.kate.desktop).

Doing it vice versa, ie. system default is TB and I go with /bin/kate in the input field, it still opens TB. So confirming your bug (probably the same I mentioned above).

Version: 7.4.1.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
7.4.1-3
Calc: threaded
Comment 7 Jorg K 2022-10-04 11:57:06 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Jorg K from comment #5)
> > Sorry, I have an older version 6.4.7.2.
> That's five major releases behind the current.

I am sorry, I'm developing on Windows, this is from an "old" VM wit Mint 20. I have another real Linux machine, also with Mint 20, to compile BB. Needs to be as old as possible to pick an old version of glibc so it remains compatible with older systems some users use.

BTW, there is a .desktop file for BB, shipping in both Arch and Flatpak.

> I remember a recent discussion but cannot find it. Anyway, on Arch Linux /
> KDE I get thunderbird.desktop in this field. Changing the system default to
> something else brings it into this dialog after the next program restart
> (Kate, picked just some random application, becomes org.kde.kate.desktop).

So "this field" in the OS' default application configuration, not LO. It will depend on distro/desktop how that is handled.

> Doing it vice versa, ie. system default is TB and I go with /bin/kate in the
> input field, it still opens TB. So confirming your bug (probably the same I
> mentioned above).

Now "the input field" refers to the LO field? So you're confirming that the LO field is basically ignored.

That brings us back to the question how LO reads the "system default".
Comment 8 Timur 2022-10-04 12:46:37 UTC
From bug 149895: If email program is not specified in "Tools > Options > Internet > Email", default system email program is used via xdg-email or kde-open. 
If it is specified, new Ubuntu or claws has bug 149897. 
Apart from that, there's a bug of not adding attachment.
Comment 9 Jorg K 2022-10-04 19:50:51 UTC
(In reply to Timur from comment #8)
> From bug 149895: If email program is not specified in "Tools > Options >
> Internet > Email", default system email program is used via xdg-email or
> kde-open. 

So the "Tools > Options > Internet > Email" setting is respected, well, maybe in later versions, not in my ancient 6.4.7.2.

> Apart from that, there's a bug of not adding attachment.

Do you have a number for that? Is that for TB 102 (https://bugzilla.mozilla.org/show_bug.cgi?id=1793323)?
Comment 10 Timur 2022-10-05 12:11:46 UTC
I don't know if there's a bug apart from bug 116211 where problem is seen with claws.
Comment 11 mfs 2022-10-07 17:47:31 UTC
Created attachment 182907 [details]
add Betterbird to the list of Thunderbird-like mail clients

I am proposing the attached patch to add Betterbird to the list of mail clients that senddoc.sh treats like Thunderbird. Together with the fix implemented on Betterbird side this should make the integration between LO and Betterbird work for users that specify Betterbird as their mail client in the LO settings.
Comment 12 Heiko Tietze 2022-10-10 09:03:17 UTC
(In reply to mfs from comment #11)
> I am proposing the attached patch...

Mind to submit the patch to Gerrit? https://wiki.documentfoundation.org/Development/gerrit
Comment 14 Commit Notification 2022-10-10 14:57:07 UTC
Martin Schumann committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/42fe257fa4d970f58543ca40f5158c04f607bc61

tdf#151314 add Betterbird to Thunderbird-like mail clients in senddoc.sh

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2022-10-10 17:13:27 UTC
Martin Schumann committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/1b96613ad50488d2d2346d02630cb9f08bdcee73

tdf#151314 add Betterbird to Thunderbird-like mail clients in senddoc.sh

It will be available in 7.4.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.