Cherry-pick commits from upstream issue tracker
This backports a bunch of commits submitted upstream so we can work with gnome-session 49 and the rust crates currently in Debian.
I didn't make that too detailed as I hope upstream will release a new version in the next days but I figured we don't want to block the GNOME 49 migration.
Closes: #1116545
Edited by Guido Günther