Bug 259700 - www/chromium (plasma5 global menu) does not work OOTB
Summary: www/chromium (plasma5 global menu) does not work OOTB
Status: New
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:
Depends on:
Blocks:
 
Reported: 2021-11-07 16:41 UTC by Jesper Schmitz Mouridsen
Modified: 2021-11-13 15:05 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Schmitz Mouridsen freebsd_committer 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 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