Hi Arnaud, I managed to get it working based on your description. Here are a few observations that may be of interest:
Arnaud Daby-Seesaram <ds...@nanein.fr> writes: > Hi, > > I am not an expert at Wayland (at all), but my current Sway > configuration works for screen sharing (I have just made a test in > Librewolf). Here is a brief description of my solution: > > - I use Guix System. My list of services contains most of > %desktop-services (+ other irrelevant services), > > - I configure Sway using Guix Home and start it from a TTY. It will also work if you configure Sway manually, ie. without home-sway-service-type. > I have added both xdg-desktop-portal and xdg-desktop-portal-wlr to my > Guix Home packages (via the `packages' field of `sway-configuration'). > In a previous iteration of my setup, they were not in the same > profile, and screen sharing did not work. > > I use `home-pipewire-service-type' and `home-dbus-service-type'. Can confirm that both of these are necessary. > Moreover, Sway executes the following at startup & reload: > + (file-append > dbus "/bin/dbus-update-activation-environment " > "--systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway") > + "$HOME/.guix-home/profile/libexec/xdg-desktop-portal -r" > + "$HOME/.guix-home/profile/libexec/xdg-desktop-portal-wlr -r" > I experimented a bit here, and I landed on the following in my sway config: exec dbus-update-activation-environment WAYLAND_DISPLAY ...which is the equivalent of the first line of your 'startup-programs' field of 'home-sway-configuration' that you shared above; I started with your line and then gradually slimmed it down to this. (So, I didn't need the '--systemd' flag or XDG_CURRENT_DESKTOP) The other two lines that you have there do not appear to be necessary; screensharing works for me without them. For future reference: I am using Firefox version 136.0 from Nonguix. > I do not claim that this is the right way to do it, but it works for me. > If others have a cleaner solution, or an explanation for why it works, > I would love to read them. > > > Best regards, > > -- > Arnaud