Skip to content

[Bug]: system default browser not being honored #1733

Closed

Description

@willowweevil

Feature description

"Open in the External Browser" button in the web block opens the web page in the Google Chrome (relevant for me with Ubuntu 24 and installed Firefox and Chrome browsers), despite the fact that Firefox is selected as a default browser.
On the web page of the configuration (https://docs.waveterm.dev/config) I did not find a parameter that can change the external default browser for the wave terminal.

It would be nice to get the opportunity to choose a browser to open a web page (or use the default system browser).

Implementation Suggestion

No response

Anything else?

No response

Activity

  1. added
    enhancement
    triage
    on Jan 15, 2025
  2. esimkowitz commented on Jan 15, 2025

    @esimkowitz
    Contributor

    What happens if you run open https://google.com in the terminal (outside of Wave)? Do you have Firefox configured as your system default?

  3. esimkowitz commented on Jan 15, 2025

    @esimkowitz
    Contributor

    This sounds more like a bug than an enhancement, we should be honoring the system default

  4. added
    bug
    enhancement
    and removed
    enhancement
    on Jan 15, 2025
  5. changed the title [-][Feature]: parameter to choose default external browser for wave[/-] [+][Bug]: system default browser not being honored[/+] on Jan 15, 2025
  6. removed
    enhancement
    on Jan 15, 2025
  7. willowweevil commented on Jan 15, 2025

    @willowweevil
    Author

    What happens if you run open https://google.com in the terminal (outside of Wave)? Do you have Firefox configured as your system default?

    in this way google.com opens in firefox (as default browser)

  8. esimkowitz commented on Jan 15, 2025

    @esimkowitz
    Contributor

    If you run the same command from inside Wave does it also open in Firefox?

  9. willowweevil commented on Jan 16, 2025

    @willowweevil
    Author

    If you run the same command from inside Wave does it also open in Firefox?

    no, it opens in Chrome

  10. esimkowitz commented on Jan 16, 2025

    @esimkowitz
    Contributor

    hah, interesting. where do you have your default browser setting configured?

  11. willowweevil commented on Jan 16, 2025

    @willowweevil
    Author
    • Ubuntu settings - Applications (Firefox selected by default);
    • in Firefox settings (i mean the point "check if Firefox is default browser" is ok);
    • with sudo update-alternatives --config x-www-browser the /usr/bin/firefox selected
  12. esimkowitz commented on Jan 16, 2025

    @esimkowitz
    Contributor

    weird we're not honoring it then... I'll do some more digging, thanks for the tip!

  13. esimkowitz commented on Jan 16, 2025

    @esimkowitz
    Contributor

    I think I found the root cause, seems like this is limited to Ubuntu 24.04 and greater. I’ll do some more digging
    electron/electron#45129

  14. esimkowitz commented on Jan 16, 2025

    @esimkowitz
    Contributor

    @willowweevil can you confirm if this workaround unblocks you? electron/electron#42611 (comment)

  15. esimkowitz commented on Jan 16, 2025

    @esimkowitz
    Contributor

    Okay I am able to reproduce this locally. It seems that the issue is with xdg-open in Electron. I think they may be overriding some internal environment variables. I can get around it by using x-www-browser instead of xdg-openand I've put together a draft PR that does this for the "Open in External Browser" button: #1754. This isn't a full solution, though, because we can't do this for the terminal session itself. I need to do more investigating to see where this variable is being unset and if I can restore the default variables.

  16. esimkowitz commented on Jan 16, 2025

    @esimkowitz
    Contributor

    Bizarrely, it seems like the cause is Electron setting XDG_CURRENT_DESKTOP=Unity, while my system has it set to ubuntu:GNOME by default.

  17. removed
    triage
    on Jan 16, 2025
  18. self-assigned this
    on Jan 16, 2025
  19. esimkowitz commented on Jan 16, 2025

    @esimkowitz
    Contributor

    I've updated the PR, I think I have a good fix for this: #1754

  20. added a commit that references this issue on Jan 16, 2025
    b7dca41
  21. added a commit that references this issue on Jun 24, 2025
    e2e7500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions