[Bug 266778] emulators/virtualbox-ose VM VirtualBox Manager: Help menu: unable to open external browser

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 02 Oct 2022 23:31:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266778

            Bug ID: 266778
           Summary: emulators/virtualbox-ose VM VirtualBox Manager: Help
                    menu: unable to open external browser
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: vbox@FreeBSD.org
          Reporter: martin@bxlr.sk
             Flags: maintainer-feedback?(vbox@FreeBSD.org)
          Assignee: vbox@FreeBSD.org

Created attachment 237030
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=237030&action=edit
patch to fix PATH

In VirtualBox Manager, QT based GUI, there's a menu Help that has several help
items. E.g. "VirtualBox Forums" which should navigate user to a proper webpage.
Under FreeBSD user is presented with error dialogue blaming desktop environment
(DE). Error occurs even if DE is fully capable of doing so (opening
browser,etc.).

Short description of the problem: /usr/local/bin/virtualbox shell wrapper is
setting PATH variable to a very generic one excluding /usr/local/bin. Due to
this browsers outside this PATH are not found.

Handling URL is done by QT's QDesktopServices API. During the resolving 
detectWebBrowser() is called:

https://codebrowser.dev/qt5/qtbase/src/platformsupport/services/genericunix/qgenericunixservices.cpp.html#_ZL16detectWebBrowserRK10QByteArraybP7QString

which calls findExecutable()

https://codebrowser.dev/qt5/qtbase/src/corelib/io/qstandardpaths.cpp.html#_ZN14QStandardPaths14findExecutableERK7QStringRK11QStringList

Here qgetenv("PATH") is called which is used as PATH to search executables.

It makes sense to expand the PATH to include FreeBSD's standard /usr/local/bin
as that's native path for ports programs. 

I've added the patch towards the virtualbox-ose-6.1.36.

-- 
You are receiving this mail because:
You are the assignee for the bug.