One equivalent cmd to show the issue
$ sudo -H -u ubuntu --preserve-env=DBUS_SESSION_BUS_ADDRESS gio open https://www.ubuntu.com
adding XDG_DATA_DIRS leads to the right behaviour
One equivalent cmd to show the issue
$ sudo -H -u ubuntu --preserve- env=DBUS_ SESSION_ BUS_ADDRESS gio open https:/ /www.ubuntu. com
adding XDG_DATA_DIRS leads to the right behaviour