[05:22] <seb128> goood morning desktopers
[05:29] <duflu> Morning seb128 
[05:32] <jibel> Good morning
[05:45] <duflu> Morning jibel 
[05:48] <callmepk> morning seb128 jibel and afternoon duflu
[05:53] <oSoMoN> good morning desktoppers
[05:54] <duflu> Hi callmepk and oSoMoN 
[05:54] <oSoMoN> hey duflu 
[05:54] <callmepk> morning oSoMoN 
[05:55] <oSoMoN> hey callmepk 
[05:55] <ricotz> good morning
[05:55] <duflu> Morning ricotz 
[06:24] <oSoMoN_> good morning ricotz 
[06:30] <jibel> Hi duflu callmepk oSoMoN_ 
[06:33]  * ricotz wonders if there is a deadline for moving for libera.chat
[06:35] <callmepk> hi jibel ricotz 
[06:36] <callmepk> Not seeing much people from here at libera.chat though
[06:36] <oSoMoN_> salut jibel 
[06:47] <seb128> hey duflu callmepk oSoMoN ricotz jibel, how are you?
[06:47] <seb128> oSoMoN, wb, did you have some nice holidays?
[06:48] <callmepk> seb128 it's okay, how about you?
[06:49] <seb128> callmepk, tired but alright otherwise I think!
[07:01] <didrocks> good morning
[07:03] <callmepk> hi didrocks 
[07:04] <marcustomlinson> morning callmepk duflu jibel oSoMoN ricotz seb128 didrocks
[07:04] <duflu> Hi didrocks and marcustomlinson 
[07:04] <callmepk> hi marcustomlinson 
[07:07] <didrocks> hey callmepk, marcustomlinson, duflu!
[07:11] <jibel> Hi marcustomlinson didrocks 
[07:12] <jibel> seb128, doing well, thanks.
[07:12] <didrocks> salut jibel 
[07:40] <seb128> hey marcustomlinson, lut didrocks, how are you?
[07:41] <didrocks> seb128: I’m fine, thanks, and you?
[07:42] <marcustomlinson> seb128: still a little low on energy but doing better thanks
[07:44] <seb128> didrocks, it was nice!
[07:44] <seb128> marcustomlinson, get better!
[07:52] <Nafallo> morning to the old network :-D
[08:17] <ogra> ... the network for the elderly ... 
[08:24] <oSoMoN> hey seb128, thanks! holidays were nice, not very relaxing as we moved a lot, but good anyway
[08:24] <oSoMoN> and we got lots of sun and good food
[08:24] <oSoMoN> salut didrocks, hey marcustomlinson, Nafallo and ogra 
[08:25]  * ogra waves with his cane
[08:25] <oSoMoN> gotta come to terms with it, we're part of the old guard…
[08:25] <ogra> yeah 🙂
[08:29] <didrocks> hey hey oSoMoN, Nafallo 
[09:14] <Wimpress> Morning o/
[09:14] <Wimpress> oSoMoN: I have news :)
[09:15] <Wimpress> There is a 'screencast-legacy' interface.
[09:15] <Wimpress> Adding that and manually connecting it get me new and interesting crashes and debug output :D
[09:18] <Wimpress> oSoMoN: And is works!
[09:18] <oSoMoN> Wimpress, interesting, let me try that with chromium
[09:18] <oSoMoN> what else (apart from connecting that interface) did you have to do to make it work?
[09:18] <Wimpress> PIPEWIRE_CONFIG_NAME: $SNAP/usr/share/pipewire/pipewire.conf
[09:19] <Wimpress> That ^ was required, to reference where the source part build of pipewire pout the config.
[09:20] <Wimpress> https://usercontent.irccloud-cdn.com/file/D40ymvNh/image.png
[09:21] <oSoMoN> I already had "PIPEWIRE_CONFIG_NAME: $SNAP/etc/pipewire/pipewire.conf" in my snapcraft.yaml, not sure why the difference in the install path
[09:22] <Wimpress> Yes. But that is not where the config file is placed.
[09:23] <Wimpress> At least not with how I build pipewire.
[09:31] <oSoMoN> Wimpress, the only relevant difference I can see between my source part and yours, in this regard, is that I'm building pipewire 0.3.26, and you're building 0.3.28
[09:31] <Wimpress> Weird.
[09:32] <Wimpress> `squashfs-root/usr/share/pipewire/pipewire.conf`
[09:32] <oSoMoN> and indeed, quoting https://gitlab.freedesktop.org/pipewire/pipewire/-/releases#highlights : « Config files are now installed in the data dir, system
[09:32] <oSoMoN> overrides in /etc/pipewire and $HOME are checked first. »
[09:32] <Wimpress> I have nothing in `etc` for pipewire in my snap.
[09:32] <oSoMoN> so it's just an upstream change
[09:32] <Wimpress> OK, so you found the reason :-)
[09:33] <Wimpress> https://github.com/snapcrafters/obs-studio/commit/71b89c6f9e07971d5d7d35757f1199fcf47b1d84
[09:35] <oSoMoN> let's see if adding the screencast-legacy plug makes it work for chromium
[09:35] <jamesh> if they've got pipewire support, it shouldn't be much trouble to use the xdg-desktop-portal interface and ditch screencast-legacy
[09:38] <oSoMoN> they do: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
[09:39] <Wimpress> jamesh: o/
[09:39] <Wimpress> So, is xdg-desktop-portal a discrete interface or part of the desktop interface?
[09:40] <jamesh> desktop interface
[09:41] <Wimpress> In addition to defining the desktop interface in the yaml, what else is required?
[09:41] <jamesh> Wimpress: it certainly looks like OBS is using portals: https://github.com/obsproject/obs-studio/blob/master/plugins/linux-capture/pipewire.c#L1074-L1081
[09:41] <Wimpress> Yes, it is.
[09:42] <Wimpress> But until I added `screencast-legacy` I couldn't get screen/window capture to work under Wayland. 
[09:42] <jamesh> Wimpress: it shouldn't require any extra interface connections.  All screencast-legacy gives you is permission to call a few gnome-shell D-Bus calls that OBS doesn't even seem to be using
[09:43] <Wimpress> I got the idea from here: https://github.com/xlmnxp/blue-recorder/blob/master/snap/snapcraft.yaml#L45
[09:45] <jamesh> Wimpress: this is all that screencast-legacy is giving you: https://github.com/snapcore/snapd/blob/264284dfbd0b4e1f2f5df50719672f3fb1f91839/interfaces/builtin/screencast_legacy.go#L33-L52 -- if you're not calling any of those D-Bus methods, then it likely isn't doing anything
[09:45] <jamesh> maybe try your working snap build and see what happens when you leave screencast-legacy unconnected?
[09:46] <Wimpress> OK
[09:46] <Wimpress> The obs-studio snap in the edge channel has this all enablked.
[09:46] <Wimpress> The obs-studio snap in the edge channel has this all enabled.
[09:47] <jamesh> Wimpress: in the case of that blue-recorder snap, it really is using the non-portal interface: https://github.com/xlmnxp/blue-recorder/blob/f4a8461ac725e8a9b77457e254f965222fee6222/src/ffmpeg_interface.rs#L68-L71
[09:47] <Wimpress> Huh.
[09:48] <Wimpress> Disconnected screencast-legacy, and it still works.
[09:48] <Wimpress> So, in my case. Just fixing the path to the pipewire config seems to have been the remedy.
[09:48] <jamesh> Apps like Firefox are using the portal interface even when not running confined, since it gives them a single code path that will work on both GNOME and KDE desktops
[09:50] <jamesh> that's one less interface that you'd need to request auto-connection for :-)
[09:50] <oSoMoN> jamesh, I'm seeing this with the chromium snap:
[09:50] <oSoMoN> [W][000018638.526850][module-portal.c:147 on_portal_pid_received()] Failed to receive portal pid: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.202" (uid=1000 pid=59101 comm="/snap/chromium/x2/usr/lib/chromium-browser/chrome " label="snap.chromium.chromium (enforce)") interface="org.freedesktop.DBus" member="GetConnectionUnixProcessID" erro
[09:50] <oSoMoN> r name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)
[09:51] <oSoMoN> not sure how relevant that is
[09:53] <Wimpress> oSoMoN: See the same denial here too.
[09:53] <oSoMoN> so probably harmless
[09:53] <Wimpress> However, try and share more that one window/screen and pipewire segfaults.
[09:54] <Wimpress> *more than one
[09:54] <jamesh> oSoMoN: weird.   It looks like that method should be allowed by desktop-legacy, which it looks like you plug
[09:54] <oSoMoN> yes
[09:55] <oSoMoN> the portal window says "Select window to share with (null)", so the name of the application is not being passed through correctly
[09:56] <jamesh> the app name is something we need to fix on the portal side.  It's not something you can do from within the sandbox
[09:56] <oSoMoN> and gnome shell shows the active screen sharing indicator, but no actual content is being shared in chromium
[09:56] <oSoMoN> ok
[09:56] <jamesh> (since it is meant to be info the sandboxed app can't forge)
[09:59] <jamesh> oSoMoN: on my system, it certainly looks like /var/lib/snapd/apparmor/profiles/snap.chromium.chromium has the rules to allow calling GetConnectionUnixProcessID
[10:02] <oSoMoN> it does here too, but I'm still seeing this denial: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/" interface="org.freedesktop.DBus" member="GetConnectionUnixProcessID" mask="send" name="org.freedesktop.DBus" pid=61781 label="snap.chromium.chromium" peer_label="unconfined"
[10:02] <jamesh> oSoMoN: ah.  it's the path
[10:03] <oSoMoN> yeah, path="/"
[10:03] <jamesh> looks like this is the source: https://github.com/PipeWire/pipewire/blob/4e70799922c5e5859720f8987c53f7794e833f3c/src/modules/module-portal.c#L175-L178
[10:03] <jamesh> why isn't it using /org/freedesktop/DBus as the object path?
[10:05] <jamesh> that looks like a straight up bug in pipewire
[10:09] <oSoMoN> I'll rebuild the part from source with a patch to fix the path, let's see if it helps
[10:26] <oSoMoN> jamesh, I patched the path and rebuilt libpipewire-module-portal.so in the snap, the denial goes away but still no actual screen content being shared
[10:30] <ogra> oSoMoN, screencast-legacy definitely helps as last resort i found ... (for zoom-client i added it on the weekend)
[10:30] <jamesh> oSoMoN: thinking about it more, I'm curious about why that code would be running inside the sandbox in the first place.
[10:30] <jamesh> oSoMoN: as I understand it, the modules get loaded into the pipewire daemon: not the client applications
[10:31] <jamesh> ogra: assuming the application was written to use the old screencast API, which is not the case here.
[10:34] <oSoMoN> yeah, screencast-legacy doesn't make a difference here
[10:35] <jamesh> if you can't find the string org.gnome.Shell.Screencast in any of your binaries, you probably don't want screencast-legacy
[11:02] <ogra> jamesh, oh, ouch
[11:02] <ogra> that might also be the reason why zoom can only share the full screen and not single apps under wayland then
[15:08] <hellsworth> good morning desktopers
[15:08] <oSoMoN> hey hellsworth 
[15:08] <marcustomlinson> morning hellsworth
[15:08] <hellsworth> hi guys :)
[15:10] <didrocks999> hey hellsworth!
[15:10] <hellsworth> o/ didrocks999 
[15:49] <ricotz> hey hellsworth 
[16:34] <hellsworth> hi there ricotz