How to set default browser in linux for wxWidgets

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
jbdurand
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Dec 19, 2019 8:51 am

How to set default browser in linux for wxWidgets

Post by jbdurand » Thu Dec 19, 2019 9:05 am

Dear everyone,
I am no wxWidgets developer, just a urbackup user. On ubuntu 18.04 with urbackup v2.4.9.0 I encountered a problem I did not have with ubuntu 16.04: the default browser in wxWidgets is set as either google chrome or firefox but I cannot set it to konqueror. This is a problem since the browser is run as root user. The full description of why this is a problem in urbackup is here: https://forums.urbackup.org/t/ubuntu-ho ... ckups/8151
I am referring to the browser launched in wxLaunchDefaultBrowser.
I tried to set the default browser using the ubuntu way: either in system settings, update-alternatives --config x-www-browser or using the BROWSER environment variable
https://askubuntu.com/questions/16621/h ... mmand-line
but this does not seem to have side effects on the default browser in wxWidgets. Is there a specific way to set this in wxWidgets?

Thank you!

User avatar
doublemax
Moderator
Moderator
Posts: 14594
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to set default browser in linux for wxWidgets

Post by doublemax » Thu Dec 19, 2019 9:23 am

I don't work under Linux, so i can't help much. But this is the code responsible for launching the default browser:
https://github.com/wxWidgets/wxWidgets/ ... .cpp#L2683

As you can see it uses different methods depending on GTK version and desktop.

Maybe it gives you a hint.
Use the source, Luke!

Post Reply