IsmaelMartinez / teams-for-linux

Unofficial Microsoft Teams for Linux client
GNU General Public License v3.0
2.96k stars 240 forks source link

Ability to select default browser for links #1446

Closed Andrew-Cha closed 1 month ago

Andrew-Cha commented 1 month ago

Is your feature request related to a problem? Please describe. When I open links it always opens Google Chrome. I use Firefox.

Describe the solution you'd like I'd like an option / an explanation of how to pick a default browser for my links.

Describe alternatives you've considered I have tried looking through the Issues on GitHub / the settings in the app and nothing is seemingly respecting the default browser of my OS (Ubuntu 24)

IsmaelMartinez commented 1 month ago

Hi,

You can use the defaultURLHandler config option to define what browser to use.

See https://github.com/IsmaelMartinez/teams-for-linux/tree/develop/app/config

Hope helps,

cw-dimedis commented 1 month ago

@IsmaelMartinez Can you actually confirm this works when you have teams-for-linux installed via Snap?

I added this config.json:

{
        "defaultURLHandler": "firefox"
}

But when I click on a link I get this error:

openInBrowserErrorHandler spawn firefox ENOENT

I also tried with an absolute path and with a wrapper script, but the process does not seem to be able to see the firefox executable.

openInBrowserErrorHandler Command failed: /home/cw/bin/open-firefox.sh https://martinfowler.com
/home/cw/bin/open-firefox.sh: line 2: /usr/bin/firefox: No such file or directory
IsmaelMartinez commented 1 month ago

That might not work with snap due to content isolation. I would recommend using deb instead to verify if that is the case.

Andrew-Cha commented 4 weeks ago

Thanks for the clarification.

cw-dimedis commented 4 weeks ago

Yay! I can confirm it works when I install the app via apt.

I had to go the extra step to give "chrome-sandbox" the -s flag to get it running, though.

Many thanks!