From fe2475a4ebf03271b3f1ddd767c2e22aada59530 Mon Sep 17 00:00:00 2001 From: Jeremy Whiting Date: Wed, 15 May 2024 08:29:22 -0600 Subject: [PATCH 1/2] Remove old scripts. The functionality of these is all included in steamosctl. --- bin/steamos-disable-wifidebug | 9 --------- bin/steamos-enable-wifidebug | 8 -------- bin/steamos-get-wifidebug | 5 ----- 3 files changed, 22 deletions(-) delete mode 100644 bin/steamos-disable-wifidebug delete mode 100644 bin/steamos-enable-wifidebug delete mode 100644 bin/steamos-get-wifidebug diff --git a/bin/steamos-disable-wifidebug b/bin/steamos-disable-wifidebug deleted file mode 100644 index 5c28479..0000000 --- a/bin/steamos-disable-wifidebug +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Tell steamos-manager to start wifi debugmode -# parameters are 2 unsigned integers -# mode: 1 for on, 0 for off -# buffer_size: the size in kilobytes to use for the trace (if on galileo device). -# Use 0 for buffer_size since it's only used when mode is 1 - -busctl call com.steampowered.SteamOSManager1 /com/steampowered/SteamOSManager1 com.steampowered.SteamOSManager1.Manager SetWifiDebugMode uu 0 0 - diff --git a/bin/steamos-enable-wifidebug b/bin/steamos-enable-wifidebug deleted file mode 100644 index 67e826a..0000000 --- a/bin/steamos-enable-wifidebug +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# Tell steamos-manager to start wifi debugmode -# parameters are 2 unsigned integers -# mode: 1 for on, 0 for off -# buffer_size: the size in kilobytes to use for the trace (if on galileo device). - -busctl call com.steampowered.SteamOSManager1 /com/steampowered/SteamOSManager1 com.steampowered.SteamOSManager1.Manager SetWifiDebugMode uu 1 20000 - diff --git a/bin/steamos-get-wifidebug b/bin/steamos-get-wifidebug deleted file mode 100644 index e162d34..0000000 --- a/bin/steamos-get-wifidebug +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# Get wifi debugmode from steamos-manager - -busctl get-property com.steampowered.SteamOSManager1 /com/steampowered/SteamOSManager1 com.steampowered.SteamOSManager1.Manager WifiDebugModeState - From e0f9019172cb3b6ba95f8197d1f53cdc1606a3b6 Mon Sep 17 00:00:00 2001 From: Jeremy Whiting Date: Wed, 15 May 2024 08:30:09 -0600 Subject: [PATCH 2/2] Update the README file with how things have changed lately. Most of the text of the README was written before we landed on not using a config file for each api to make it a simple jump table. Also added some bits about user daemon vs root daemon. --- README.md | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 04f8fdc..8b53280 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,23 @@ This is the SteamOS Manager. -It is a small daemon that's sole purpose is to give Steam something with a dbus +It is a small daemon that's sole purpose is to give Steam something with a DBus api that runs as root and can do things to the system without having to have -hard coded paths and dbus apis in the Steam client itself. +hard coded paths and DBus apis in the Steam client itself. -It is a thin wrapper around other scripts and dbus apis that provides feedback for -each dbus method it implements. +It is a mostly thin wrapper around other scripts and DBus apis that provides feedback for +each DBus method it implements. How it works: -The SteamOS Manager reads various config files (one per thing that it needs to support) -that have a DBus method defined in them along with the parameters needed for that method. -When it reads each config file it creates a DBus method on it's interface that other applications -and processes can call. When each method is called, either the script referred to in the config -is called and output and exit codes are given back to the caller, or a dbus method is called -from another daemon and the feedback it gets is given back to the caller. +The SteamOS Manager runs as root and exposes a DBus api on the system bus. +Another instance runs as deck user and exposes a DBus api on the session bus with +a few extra methods. These methods run directly in the user daemon as deck user. All +other apis forward to the root daemon via it's DBus api. To add a new method: -Add a new config file (more on this later once we flesh out details) with the method name, parameters -and what should happen when it is called. For most dbus type methods, the incoming method and parameters -will likely closely resemble what we call on another daemon. The purpose of this is to make it flexible -for various operating systems to do things their own way. For example on a system that doesn't want to -include systemd many systemd type operations could be carried out by scripts instead of calling a systemd -dbus api. +To add a new method that doesn't require root privileges add it to the user daemon's DBus api +directly. + +To add a new method that does require root privileges add it to the root daemon's DBus api and it will +be exposed automatically in the user daemon.