mirror of
https://github.com/ben-grande/qusal.git
synced 2024-12-28 00:49:33 -05:00
feat: add Qubes Video Companion formula
Fixes: https://github.com/ben-grande/qusal/issues/49
This commit is contained in:
parent
c2db142f2d
commit
0c9b173e2c
73
salt/video-companion/README.md
Normal file
73
salt/video-companion/README.md
Normal file
@ -0,0 +1,73 @@
|
||||
# video-companion
|
||||
|
||||
Stream webcams and share screens in Qubes OS.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Description](#description)
|
||||
* [Installation](#installation)
|
||||
* [Usage](#usage)
|
||||
|
||||
## Description
|
||||
|
||||
Installation procedures to stream webcams and share screens across qubes. The
|
||||
sender/server owns the screen or webcam and the receiver/client wants to
|
||||
access them without compromising the domains.
|
||||
|
||||
## Installation
|
||||
|
||||
- Top:
|
||||
```sh
|
||||
sudo qubesctl top.enable video-companion
|
||||
sudo qubesctl state.apply
|
||||
sudo qubesctl top.disable video-companion
|
||||
```
|
||||
|
||||
- State:
|
||||
<!-- pkg:begin:post-install -->
|
||||
```sh
|
||||
sudo qubesctl state.apply video-companion.create
|
||||
```
|
||||
<!-- pkg:end:post-install -->
|
||||
|
||||
|
||||
Installation on the server (sender) template:
|
||||
```sh
|
||||
sudo qubesctl --skip-dom0 --targets=QUBE state.apply video-companion.install-sender
|
||||
```
|
||||
|
||||
Installation on the client (receiver) template:
|
||||
```sh
|
||||
sudo qubesctl --skip-dom0 --targets=QUBE state.apply video-companion.install-receiver
|
||||
```
|
||||
|
||||
Installation for debugging on the client (receiver) template:
|
||||
```sh
|
||||
sudo qubesctl --skip-dom0 --targets=QUBE state.apply video-companion.install-receiver-debug
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The sender has the screen you want to share of the webcam you want to access.
|
||||
|
||||
The receiver the is client that requests access to the screen of webcam,
|
||||
therefore the client is responsible to initiate the call.
|
||||
|
||||
On the client, to get the screen of another qube:
|
||||
```sh
|
||||
qubes-video-companion screenshare
|
||||
```
|
||||
|
||||
On the client, to get the webcam of another qube:
|
||||
```sh
|
||||
qubes-video-companion webcam
|
||||
```
|
||||
|
||||
On the client, if you installed the debug utilities, call cheese to access the
|
||||
shared screen or webcam:
|
||||
```sh
|
||||
cheese
|
||||
```
|
||||
|
||||
Refer to [upstream usage guide](https://github.com/QubesOS/video-companion?tab=readme-ov-file#usage)
|
||||
for more information.
|
15
salt/video-companion/create.sls
Normal file
15
salt/video-companion/create.sls
Normal file
@ -0,0 +1,15 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
include:
|
||||
- utils.tools.common.update
|
||||
|
||||
"{{ slsdotpath }}-dom0-installed":
|
||||
pkg.installed:
|
||||
- require:
|
||||
- sls: utils.tools.common.update
|
||||
- pkgs:
|
||||
- video-companion-dom0
|
10
salt/video-companion/create.top
Normal file
10
salt/video-companion/create.top
Normal file
@ -0,0 +1,10 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'dom0':
|
||||
- match: nodegroup
|
||||
- video-companion.create
|
8
salt/video-companion/files/admin/policy/default.policy
Normal file
8
salt/video-companion/files/admin/policy/default.policy
Normal file
@ -0,0 +1,8 @@
|
||||
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
## Do not modify this file, create a new policy with with a lower number in the
|
||||
## file name instead. For example `30-user.policy`.
|
||||
qvc.Webcam * @anyvm @tag:usbvm ask
|
||||
## vim:ft=qrexecpolicy
|
10
salt/video-companion/init.top
Normal file
10
salt/video-companion/init.top
Normal file
@ -0,0 +1,10 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'dom0':
|
||||
- match: nodegroup
|
||||
- video-companion.create
|
22
salt/video-companion/install-receiver-debug.sls
Normal file
22
salt/video-companion/install-receiver-debug.sls
Normal file
@ -0,0 +1,22 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
include:
|
||||
- utils.tools.common.update
|
||||
- .install-receiver
|
||||
|
||||
"{{ slsdotpath }}-receiver-debug-installed":
|
||||
pkg.installed:
|
||||
- require:
|
||||
- sls: utils.tools.common.update
|
||||
- install_recommends: False
|
||||
- skip_suggestions: True
|
||||
- pkgs:
|
||||
- dunst
|
||||
|
||||
{% endif %}
|
9
salt/video-companion/install-receiver-debug.top
Normal file
9
salt/video-companion/install-receiver-debug.top
Normal file
@ -0,0 +1,9 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- video-companion.install-receiver-debug
|
32
salt/video-companion/install-receiver.sls
Normal file
32
salt/video-companion/install-receiver.sls
Normal file
@ -0,0 +1,32 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
include:
|
||||
- utils.tools.common.update
|
||||
|
||||
"{{ slsdotpath }}-receiver-installed":
|
||||
pkg.installed:
|
||||
- require:
|
||||
- sls: utils.tools.common.update
|
||||
- install_recommends: False
|
||||
- skip_suggestions: True
|
||||
- pkgs:
|
||||
{% if grains['os_family']|lower == 'debian' -%}
|
||||
- qubes-video-companion
|
||||
{% else %}
|
||||
- qubes-video-companion-receiver
|
||||
{% endif %}
|
||||
{% if '.qubes.' not in salt['cmd.shell']('uname -r') and grains['os_family']|lower == 'debian' -%}
|
||||
- v4l2loopback-dkms
|
||||
{% endif %}
|
||||
## Undeclared dependencies
|
||||
- qubes-core-agent-passwordless-root
|
||||
- dunst
|
||||
- libnotify-bin
|
||||
|
||||
{% endif %}
|
9
salt/video-companion/install-receiver.top
Normal file
9
salt/video-companion/install-receiver.top
Normal file
@ -0,0 +1,9 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- video-companion.install-receiver
|
27
salt/video-companion/install-sender.sls
Normal file
27
salt/video-companion/install-sender.sls
Normal file
@ -0,0 +1,27 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
include:
|
||||
- utils.tools.common.update
|
||||
|
||||
"{{ slsdotpath }}-sender-installed":
|
||||
pkg.installed:
|
||||
- require:
|
||||
- sls: utils.tools.common.update
|
||||
- install_recommends: False
|
||||
- skip_suggestions: True
|
||||
- pkgs:
|
||||
{% if grains['os_family']|lower == 'debian' -%}
|
||||
- qubes-video-companion
|
||||
{% else %}
|
||||
- qubes-video-companion-sender
|
||||
{% endif %}
|
||||
## Undeclared dependencies
|
||||
- dunst
|
||||
|
||||
{% endif %}
|
9
salt/video-companion/install-sender.top
Normal file
9
salt/video-companion/install-sender.top
Normal file
@ -0,0 +1,9 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'*':
|
||||
- video-companion.install-sender
|
Loading…
Reference in New Issue
Block a user