Skip to content

server: Create a single temporary portal session on server startup

Arjen Hiemstra requested to merge work/ahiemstra/portalpermission into master
  • server: Don't start until after the portal and session is started

We require the portal so make sure that is at least available. We also don't really want to pop up any dialogs if the session isn't properly started yet, so wait until the splash screen is done.

  • server: Properly cleanup SessionWrapper objects

Since we're storing the connection as a QPointer comparing the destroyed connection to the stored connection doesn't work since the QPointer is already cleared at the point the connection has been destroyed. We don't really want to track the connection anyway, we want to track the wrapper. So make the wrapper emit a signal on connection loss that we use to cleanup the wrapper.

BUG: 488367 BUG: 488364

  • server: Create a single temporary portal session on server startup

We want to ask the user for permission when it's convenient, not when there's nobody at the machine to confirm the permissions. So create a portal session at startup to request the permisisons.

Unfortunately we cannot reuse this portal session since it leads to reconnection issues with the PipeWire stream. While that is probably solvable it also causes additional problems, most notably that the "Remote Desktop" SNI will be constantly active. So instead, discard the session after it was successfully started and create a new session when a new connection is incoming.

This assumes the user checked "remember" for the portal permission. Unfortunately there is not a whole lot we can do to force that. In general the permission model here is rather lacking.

CCBUG: 488372

Merge request reports

Loading