Use Webapp Manager app for Fastmail as default email

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
WineCurmudgeon
Level 1
Level 1
Posts: 4
Joined: Mon May 23, 2022 4:00 pm

Use Webapp Manager app for Fastmail as default email

Post by WineCurmudgeon »

Is this possible? That is, is there a way to use the "app" the manager created for Fastmail, a webmail app, as the default email in both XFCE Mint system settings and in the Firefox application setting for Mailto.

I've tried a half dozen or so things, including using the .desktop file, and nothing works. Most commonly, I get an error that says I'm trying to open Firefox twice. Thanks for your help.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Use Webapp Manager app for Fastmail as default email

Post by dave0808 »

A big "maybe".

The 'web app' is basically an instance of Firefox with a unique profile.

I could imagine a possible scenario, which would depend on Fastmail... if there is a unique URL to compose a message and supply the recipient address, then it might be possible to create a command, that launches Firefox specifying your WebApp's profile AND the URL to compose the message.
WineCurmudgeon
Level 1
Level 1
Posts: 4
Joined: Mon May 23, 2022 4:00 pm

Re: Use Webapp Manager app for Fastmail as default email

Post by WineCurmudgeon »

Thanks for this. That's kind of what I thought. But the coding is probably more than I can figure out.

Oddly enough, Fastmail will open email links and use the Firefox "email to" widget in the "app" that is set up, so that sort of works.

So I guess we can mark this solved.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Use Webapp Manager app for Fastmail as default email

Post by dave0808 »

I was thinking about this and did a bit more digging.

The "mailto" link handling appears to be defined in ~/.config/mimeapp.list - or at least on my system. There is another file with the same name in ~/.local/share/applications which is empty, and a version of the file in ~/.local/share/applications/mimeinfo.cache.

The upshot being that there is a line that starts with x-scheme-handler/mailto where the value is a .desktop file. Mine appears to point to a desktop file that has a comment of "Custom definition for Thunderbird", so it might be something that I created and have subsequently forgotten because I've messed about with running Thunderbird under Firejail and also I use wmctrl to move the window to where I like it to be.

Either way, it should be possible to change the value for the handler to another desktop file, which is a copy of your WebApp for Fastmail, but rather than the Fastmail main URL, use a URL for composing a new email and potentially the email address. I note that the "thunderbird.desktop" file I have passes a %u parameter to Thunderbird. I'd guess that this is for passing the email address, so you could add that to the URL.

You could test it out by tweaking the whole 'Exec' line, so that it echos the line to a file. For example, you might have:-

Code: Select all

Exec=sh -c 'XAPP_FORCE_GTKWINDOW_ICON=firefox.png firefox --class WebApp-Fastmail1234 --profile /home/user/.local/share/ice/firefox/Fastmail1234 --no-remote https://www.fastmail.com/compose/%u'
which could temporarily be changed to:-

Code: Select all

Exec=sh -c 'echo "firefox --class WebApp-Fastmail1234 --profile /home/user/.local/share/ice/firefox/Fastmail1234 --no-remote https://www.fastmail.com/compose/%u" >> /tmp/testinfo.txt'
The try it out and see what is written to the file in /tmp.
WineCurmudgeon
Level 1
Level 1
Posts: 4
Joined: Mon May 23, 2022 4:00 pm

Re: Use Webapp Manager app for Fastmail as default email

Post by WineCurmudgeon »

Thanks for this. I appreciate your efforts.

I found the mailto line in /.config/mimeapp.list -- it's x-scheme-handler/mailto=userapp-Thunderbird-RRENZ0.desktop

Thunderbird had been my default mail app,

So this where I'm in over my head: What do I change the mailto line to? The second link you posted? And, unfortunately, I'm also not clear about the tmp file thing that you mention.

Thanks again.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Use Webapp Manager app for Fastmail as default email

Post by dave0808 »

Well, we might be getting ahead of ourselves here. The first thing to check is whether there is a URL that can be used to invoke the "compose new mail" part of Fastmail and can the recipient address also be passed in. Without that, we're shouting into the wind.
WineCurmudgeon
Level 1
Level 1
Posts: 4
Joined: Mon May 23, 2022 4:00 pm

Re: Use Webapp Manager app for Fastmail as default email

Post by WineCurmudgeon »

Oh, I understand. That has always been the problem. I have tired the Fastmail URL for the inbox, but nothing happens. We don't need to mess with this anymore. Thanks for your help.
Locked

Return to “Software & Applications”