Skip to content

Commit

Permalink
fix(namespace): change dbus interface name
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanabx committed May 7, 2024
1 parent ec63f71 commit 85d5a06
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ The default directories for these lifetimes are:

## Using the DBus API

The up-to-date XML interface for the API can be found [here](https://github.com/ryanabx/desktop-entry-daemon/blob/master/res/org.desktopintegration.DesktopEntry.xml).
The up-to-date XML interface for the API can be found [here](https://github.com/ryanabx/desktop-entry-daemon/blob/master/res/io.ryanabx.DesktopEntry.xml).

The DBus interface can be found at the name `org.desktopintegration.DesktopEntry` at the path `/org/desktopintegration/DesktopEntry`.
The DBus interface can be found at the name `io.ryanabx.DesktopEntry` at the path `/io/ryanabx/DesktopEntry`.

### Example 1 - Entry/Icon for the Process Lifetime

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.desktopintegration.DesktopEntry">
<interface name="io.ryanabx.DesktopEntry">
<!--
register a new desktop entry with the calling process' lifetime
-->
Expand Down
2 changes: 1 addition & 1 deletion src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Into<zbus::fdo::Error> for EntryManagerError {
}
}

#[interface(name = "org.desktopintegration.DesktopEntry")]
#[interface(name = "io.ryanabx.DesktopEntry")]
impl Daemon {
/// register a new desktop entry with the calling process' lifetime
async fn new_process_entry(
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ async fn provide_desktop_entry_api(manager: Arc<Mutex<EntryManager>>) -> zbus::R
// setup the server
connection
.object_server()
.at("/org/desktopintegration/DesktopEntry", daemon)
.at("/io/ryanabx/DesktopEntry", daemon)
.await?;
// before requesting the name
connection
.request_name("org.desktopintegration.DesktopEntry")
.request_name("io.ryanabx.DesktopEntry")
.await?;
log::info!("Running server connection and listening for calls");

Expand Down
8 changes: 5 additions & 3 deletions systemd/desktop-entry-daemon.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ After=graphical-session.target
WantedBy=graphical-session.target

[Service]
BusName=org.desktopintegration.DesktopEntry
Type=dbus
BusName=io.ryanabx.DesktopEntry
Environment="RUST_LOG=debug"
ExecStart=/usr/libexec/desktop-entry-daemon
RuntimeDirectory=desktop-entry-daemon
Type=dbus
Slice=session.slice

[Install]
WantedBy=graphical-session.target

0 comments on commit 85d5a06

Please sign in to comment.