~charles/gmixerctl

127cb004e2025a5091808e36cef8a0d6493d2266 — Charles Daniels 5 years ago 3199988 master
update doas.conf instructions
2 files changed, 15 insertions(+), 8 deletions(-)

M README.md
M gmixerctl/gui.py
M README.md => README.md +10 -6
@@ 34,6 34,16 @@ the mixerctl command itself.
python3 setup.py install
```

If you would like to be able to change the output device(s) that sndiod should
use, you should add the following lines to `/etc/doas.conf`.

```
permit nopass youruser as root cmd /usr/sbin/rcctl args set sndiod flags -f rsnd/0
permit nopass youruser as root cmd /usr/sbin/rcctl args set sndiod flags -f rsnd/1
permit nopass youruser as root cmd /usr/sbin/rcctl args set sndiod flags -f rsnd/2
permit nopass youruser as root cmd /usr/sbin/rcctl args restart sndiod
```

## Contributing

Contributions are more than welcome. If there is a feature you would like added


@@ 55,15 65,9 @@ appreciate help implementing the following features:

## Known Issues

* Configuring sndiod requires giving the user running gmixerctl access to run
  `/usr/sbin/rcctl` as root. This is overly broad, but I am unsure of the
  correct way to handle this, since limiting arguments with `doas.conf`
  requires knowing the exact set of arguments in advance.

* The information displayed in the "sndiod" tab does not update once the
  application has started.


## Rationale

My first attempt at writing gmixerctl was in the form of an imgui based C++

M gmixerctl/gui.py => gmixerctl/gui.py +5 -2
@@ 79,8 79,11 @@ class SndiodButton(tkinter.Button):
        except Exception as e:
            tkinter.messagebox.showwarning(
                        "Apply Changes",
                        "Failed to apply rcctl flags. Maybe you need to add" +
                        "\n\npermit nopass youruser as root cmd /usr/sbin/rcctl" +
                        "Failed to apply rcctl flags. Maybe you need to add\n" +
                        "permit nopass youruser as root cmd /usr/sbin/rcctl args set sndiod flags -f rsnd/0\n" +
                        "permit nopass youruser as root cmd /usr/sbin/rcctl args set sndiod flags -f rsnd/1\n" +
                        "permit nopass youruser as root cmd /usr/sbin/rcctl args set sndiod flags -f rsnd/2\n" +
                        "permit nopass youruser as root cmd /usr/sbin/rcctl args restart sndiod\n" +
                        "\n\nto /etc/doas.conf ?" +
                        "\n\nerror was:\n\n{}".format(e)
                    )