You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: system default browser not being honored #1733
"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).
What happens if you run open https://google.com in the terminal (outside of Wave)? Do you have Firefox configured as your system default?
changed the title [-][Feature]: parameter to choose default external browser for wave[/-][+][Bug]: system default browser not being honored[/+]on Jan 15, 2025
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)
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.
Activity
esimkowitz commentedon Jan 15, 2025
What happens if you run
open https://google.comin the terminal (outside of Wave)? Do you have Firefox configured as your system default?esimkowitz commentedon Jan 15, 2025
This sounds more like a bug than an enhancement, we should be honoring the system default
[-][Feature]: parameter to choose default external browser for wave[/-][+][Bug]: system default browser not being honored[/+]willowweevil commentedon Jan 15, 2025
in this way google.com opens in firefox (as default browser)
esimkowitz commentedon Jan 15, 2025
If you run the same command from inside Wave does it also open in Firefox?
willowweevil commentedon Jan 16, 2025
no, it opens in Chrome
esimkowitz commentedon Jan 16, 2025
hah, interesting. where do you have your default browser setting configured?
willowweevil commentedon Jan 16, 2025
sudo update-alternatives --config x-www-browserthe/usr/bin/firefoxselectedesimkowitz commentedon Jan 16, 2025
weird we're not honoring it then... I'll do some more digging, thanks for the tip!
esimkowitz commentedon Jan 16, 2025
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
esimkowitz commentedon Jan 16, 2025
@willowweevil can you confirm if this workaround unblocks you? electron/electron#42611 (comment)
esimkowitz commentedon Jan 16, 2025
Okay I am able to reproduce this locally. It seems that the issue is with
xdg-openin Electron. I think they may be overriding some internal environment variables. I can get around it by usingx-www-browserinstead ofxdg-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.esimkowitz commentedon Jan 16, 2025
Bizarrely, it seems like the cause is Electron setting
XDG_CURRENT_DESKTOP=Unity, while my system has it set toubuntu:GNOMEby default.esimkowitz commentedon Jan 16, 2025
I've updated the PR, I think I have a good fix for this: #1754
Correct XDG_CURRENT_DESKTOP env var (#1754)
Correct XDG_CURRENT_DESKTOP env var (wavetermdev#1754)