-
Notifications
You must be signed in to change notification settings - Fork 355
Wayland: Add configuration about screen sharing #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Thank you @lbartoletti for submitting this.
I have a few points about the overall structure, as it is not rendering well. Please use one sentence per line, following the current style of the chapter. Also, please reduce the usage of the word "you."
Attached is a patch for this PR with my suggestions. Take a look and see if you agree or if you want to change anything else.
Just a note here: the author is a FreeBSD committer and can push this by himself to the doc repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks like a nice improvement. There are a couple of points that I think could use some clarification however:
-
xdg-desktop-portal reads the
XDG_CURRENT_DESKTOP
environment variable to determine which configuration file in thexdg-desktop-portal
directory to use. For example, settingXDG_CURRENT_DESKTOP=sway
is necessary to cause it to use thesway-portals.conf
file in the example given. -
Running
dbus-update-activation-environment ...
is necessary to ensure that the WAYLAND_DISPLAY (and perhaps XDG_CURRENT_DESKTOP) environment variables are set in the environment of the xdg-desktop-portal dbus service when it is started through dbus activation (e.g. when Firefox accesses the screen sharing dbus interface and xdg-desktop-portal is not yet running). -
If there is no dbus session bus already running when
dbus-update-activation-environment
is run,dbus-update-activation-environment
will automatically start one. However this is not necessarily desirable as the automatically started dbus session bus instance is not exposed through theDBUS_SESSION_BUS_ADDRESS
environment variable and there is a risk of accidentally starting multiple session buses that are not aware of each other such that firefox does not connect to the session bus wherexdg-desktop-portal
is running.It would be more robust to explicitly start the dbus session bus before the Wayland compositor is started. Linux distros using systemd or alternatives like turnstile start exactly one dbus session bus per user that is shared across all login sessions.
Since we do not currently have infrastructure to manage the dbus session bus in that way on FreeBSD, I think the most robust way to handle this is to set things up in a wrapper script that starts the Wayland compositor:
#!/bin/sh
export XDG_CURRENT_DESKTOP=sway
# Starts a session bus instance of dbus-daemon(1) and sets $DBUS_SESSION_BUS_ADDRESS
# in the environment before executing sway
exec dbus-run-session sway
And then in the running Wayland compositor inform the dbus session bus of the WAYLAND_DISPLAY variable set by the compositor:
dbus-update-activation-environment WAYLAND_DISPLAY
Does this still need to be edited I will do this as this config is crucial. |
I was unable to get this working? Let me know if you need more info |
What is the problem for you? I don't work anymore for me too, but because of (nvidia) drm-kmod... |
After help from @bapt and @ifreund on IRC, this is a proposal to add Wayland documentation about settings to enable screen sharing.