Request the D-Bus name earlier
This commit is contained in:
parent
2456dc0ea5
commit
c9095421c6
2 changed files with 2 additions and 3 deletions
|
|
@ -156,9 +156,6 @@ async fn main() -> eyre::Result<()> {
|
|||
file_chooser: portal::file_chooser::FileChooser,
|
||||
settings: portal::settings::Settings,
|
||||
) -> Result<(), eyre::Report> {
|
||||
vm_bus_conn
|
||||
.request_name("org.freedesktop.portal.Desktop")
|
||||
.await?;
|
||||
if !vm_bus_conn
|
||||
.object_server()
|
||||
.at("/org/freedesktop/portal/desktop", file_chooser)
|
||||
|
|
@ -195,6 +192,7 @@ async fn main() -> eyre::Result<()> {
|
|||
let f = enclose!((file_chooser_imp, settings_imp) async move {
|
||||
let client_conn = zbus::connection::Builder::unix_stream(socket)
|
||||
.auth_mechanism(zbus::AuthMechanism::Anonymous)
|
||||
.name("org.freedesktop.portal.Desktop")?
|
||||
.build()
|
||||
.await?;
|
||||
on_vm_bus_connected(client_conn, file_chooser_imp, settings_imp).await
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ impl ConnectionBuilder {
|
|||
pub async fn build<'a>(self) -> eyre::Result<zbus::Connection> {
|
||||
zbus::connection::Builder::vsock_stream(self.socket)
|
||||
.auth_mechanism(zbus::AuthMechanism::Anonymous)
|
||||
.name("org.freedesktop.portal.Desktop")?
|
||||
.build()
|
||||
.await
|
||||
.map_err(|e| e.into())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue