mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-07 07:00:27 -04:00
Use the system bus.
Added a dbus service file so we can own the com.steampowered.SteamOSManager1 name. Also added a systemd service file Also add a dbus .conf file to allow any process to talk to manager for now.
This commit is contained in:
parent
dee6376309
commit
741c5b5ce4
4 changed files with 29 additions and 1 deletions
16
data/com.steampowered.SteamOSManager1.conf
Normal file
16
data/com.steampowered.SteamOSManager1.conf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!DOCTYPE busconfig PUBLIC
|
||||||
|
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||||
|
<busconfig>
|
||||||
|
<!-- Only root can own the service -->
|
||||||
|
<policy user="root">
|
||||||
|
<allow own="com.steampowered.SteamOSManager1"/>
|
||||||
|
</policy>
|
||||||
|
|
||||||
|
<!-- Anyone can send messages to the service -->
|
||||||
|
<policy context="default">
|
||||||
|
<allow send_destination="com.steampowered.SteamOSManager1"/>
|
||||||
|
</policy>
|
||||||
|
</busconfig>
|
5
data/com.steampowered.SteamOSManager1.service
Normal file
5
data/com.steampowered.SteamOSManager1.service
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[D-BUS Service]
|
||||||
|
Name=com.steampowered.SteamOSManager1
|
||||||
|
Exec=/usr/lib/steamos-manager
|
||||||
|
User=root
|
||||||
|
SystemdService=steamosmanager.service
|
7
data/steamosmanager.service
Normal file
7
data/steamosmanager.service
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[Unit]
|
||||||
|
Description=SteamOS Manager Daemon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=dbus
|
||||||
|
BusName=com.steampowered.SteamOSManager1
|
||||||
|
ExecStart=/usr/lib/steamos-manager
|
|
@ -35,7 +35,7 @@ async fn main() -> Result<()>
|
||||||
|
|
||||||
let manager = manager::SMManager {};
|
let manager = manager::SMManager {};
|
||||||
|
|
||||||
let _system_connection = ConnectionBuilder::session()?
|
let _system_connection = ConnectionBuilder::system()?
|
||||||
.name("com.steampowered.SteamOSManager1")?
|
.name("com.steampowered.SteamOSManager1")?
|
||||||
.serve_at("/com/steampowered/SteamOSManager1", manager)?
|
.serve_at("/com/steampowered/SteamOSManager1", manager)?
|
||||||
.build()
|
.build()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue