Closed dennismaloney closed 7 months ago
Looks like RuneLite uses xdg-open for that. https://github.com/runelite/runelite/blob/master/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java#L63
What does it say in RuneLite's console output when you open a website? Do you get this message about xdg-open? Maybe it's failing and defaulting to the other method?
I'm assuming you installed from Flatpak as this will almost 100% be a Flatpak sandboxing issue rather than something directly related to Bolt. It seems like the sandbox doesn't even mount xdg-settings to begin with. It does mount xdg-open, but maybe the decision of what browser to use will be different somehow.
I don't see any console messages generated at the time of opening a website, although if there's a way to get more verbose output than just running from the command line, I haven't tried that.
I installed from the AUR.
Okay, running with debug enabled, I get a message like this:
2024-02-07 09:53:31 EST [Thread-13] DEBUG net.runelite.client.util.LinkBrowser - Opened url through xdg-open to https://oldschool.runescape.wiki/w/Special:Lookup?type=item&id=12926&name=Toxic%20blowpipe&utm_source=runelite
Then, as you can see from its source code, RuneLite is quite simply spawning a process xdg-open <your url>
, and waiting for it to finish. If you type xdg-open https://oldschool.runescape.wiki/w/Special:Lookup?type=item&id=12926&name=Toxic%20blowpipe&utm_source=runelite
into a command line, which browser does that open?
Running xdg-open from the command line opens Firefox, in line with xdg-settings. There's another weird little detail in that Chromium complains about not being the default browser after being opened, so it evidently sees the same xdg-settings that I do.
Ah, it could be because you don't have any XDG environment variables set? Particularly XDG_DATA_HOME and XDG_CONFIG_HOME?
Yes, that does seem to be the problem, thank you! I'll have to see if setting them after they've been unset for so long screws with anything else, but that seems to be out of scope here.
When using RuneLite launched through Bolt, but not through the Jagex Launcher, any action that opens a web browser (such as using the wiki button) opens a new Chromium window. But in xdg-settings, default-web-browser is set to firefox.desktop.