Bug 259700 - www/chromium: Plasma5 global menu does not work out-of-the-box
Summary: www/chromium: Plasma5 global menu does not work out-of-the-box
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-chromium (Nobody)
URL:
Keywords: feature, needs-patch
Depends on:
Blocks:
 
Reported: 2021-11-07 16:41 UTC by Jesper Schmitz Mouridsen
Modified: 2022-11-27 08:42 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (chromium)


Attachments
Screnshot (585.44 KB, image/png)
2022-11-27 08:42 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2021-11-07 16:41:12 UTC
chromium does apparently not read .dbus/session-bus/MACHINE-ID-DISPLAY-DISPLAY contents 
chromium g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

. .dbus/session-bus/DBUS-MACHINE_ID-unix_0
$ DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS chrome 
works and the dbus menu of chromium shows up in plasma5 global application menu..
Thanks.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2021-11-11 00:06:11 UTC
See https://bugs.chromium.org/p/chromium/issues/detail?id=715658

Better start DBus user/session bus manually after login. On Linux this usually done transparently by (e)logind. On FreeBSD you can do something like this:

$ cat >>/etc/profile
# WARNING: zsh doesn't read this file by default, so use /etc/zprofile instead
# XDG_RUNTIME_DIR is preferred but usually requires pam_xdg or consolekit2 (pam_ck_connector or ck_launch_session)
if [ -n "$XDG_RUNTIME_DIR" ]; then
    if ! pgrep -qf -U ${USER:-$(id -u)} dbus.\*--session; then
        dbus-daemon --session --fork --address=unix:runtime=yes 2>/dev/null
	# Only necessary for some apps that fail to find default session bus (e.g., Emacs, Chrome)
	# https://gitlab.freedesktop.org/dbus/dbus/-/commit/e3f117e7610b
	export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
    fi
else
    eval $(dbus-launch --sh-syntax --exit-with-session 2>/dev/null)
fi
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-11-27 08:42:07 UTC
Created attachment 238359 [details]
Screnshot

Whilst <https://cgit.freebsd.org/ports/log/www/chromium?qt=grep&q=global> finds nothing, I do have chromium-107.0.5304.110 working with the global menu on FreeBSD 14.0-CURRENT, and I have no recollection of doing anything special to achieve this. 

Is 259700 somehow partially fixed?