how to use default webbrowser with cmake-gui

i have 2 web browser installed on my machine - chrome and firefox. cmake-gui uses chrome to open the manual. I would expect it to use the default application, instead.

  • I checked that firefox is set as default application for html files
  • I tested the configuration with xdg-open file:///snap/cmake/876/doc/cmake-3.20/html/index.html

While xdg-open uses firefox to open html files, CMake-gui opens the manual in Google chrome.

The terminal output shows some missing libraries:

cmake-gui --browse-manual
Qt: Session management error: None of the authentication protocols specified are supported
user@os:~$ libGL error: MESA-LOADER: failed to open iris: libsensors.so.4: cannot open shared object file: No such file or directory (search paths /snap/cmake/876/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: libsensors.so.4: cannot open shared object file: No such file or directory (search paths /snap/cmake/876/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: libsensors.so.4: cannot open shared object file: No such file or directory (search paths /snap/cmake/876/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast
[38041:38041:0604/111229.676962:ERROR:angle_platform_impl.cc(44)] Display.cpp:840 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[38041:38041:0604/111229.677042:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[38041:38041:0604/111229.677070:ERROR:gl_surface_egl.cc(1373)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[38041:38041:0604/111229.678636:ERROR:angle_platform_impl.cc(44)] Display.cpp:840 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[38041:38041:0604/111229.678672:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[38041:38041:0604/111229.678694:ERROR:gl_surface_egl.cc(1373)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[38041:38041:0604/111229.678714:ERROR:gl_initializer_linux_x11.cc(178)] GLSurfaceEGL::InitializeOneOff failed.
[38041:38041:0604/111229.679582:ERROR:viz_main_impl.cc(160)] Exiting GPU process due to errors during initialization
[38075:38075:0604/111229.689590:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[37971:37971:0604/111229.712626:ERROR:browser_main_loop.cc(272)] Gtk: gtk_icon_info_load_symbolic_for_context: assertion 'icon_info != NULL' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.712: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.712: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[37971:37971:0604/111229.713274:ERROR:browser_main_loop.cc(272)] Gtk: gtk_icon_info_load_symbolic_for_context: assertion 'icon_info != NULL' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.713: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.713: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): Gtk-WARNING **: 11:12:29.714: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.714: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.714: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[37971:37971:0604/111229.742225:ERROR:browser_main_loop.cc(272)] Gtk: gtk_icon_info_load_symbolic_for_context: assertion 'icon_info != NULL' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.742: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.742: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[37971:37971:0604/111229.742860:ERROR:browser_main_loop.cc(272)] Gtk: gtk_icon_info_load_symbolic_for_context: assertion 'icon_info != NULL' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.742: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.742: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.743: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.743: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.745: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(google-chrome-stable:37971): GdkPixbuf-CRITICAL **: 11:12:29.745: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[37971:37971:0604/111229.745177:ERROR:browser_main_loop.cc(272)] Gdk: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
[37971:37971:0604/111229.745189:ERROR:browser_main_loop.cc(272)] Gtk: gtk_css_style_render_icon_surface: assertion 'surface != NULL' failed

QDesktopServices is used to open the file. I suspect Qt doesn’t understand the XDG preference mechanism somehow.