Skip to content

Commit

Permalink
pulse: add qrexec services to control audio-input in another VM
Browse files Browse the repository at this point in the history
Audio VM may not be dom0, so lets allow control it through qrexec

QubesOS/qubes-issues#1590
  • Loading branch information
marmarek committed Apr 9, 2020
1 parent de42489 commit 2d86b15
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ install:
install -D gui-daemon/qubes-guid $(DESTDIR)/usr/bin/qubes-guid
install -m 0644 -D gui-daemon/qubes-guid.1 $(DESTDIR)$(MANDIR)/man1/qubes-guid.1
install -D pulse/pacat-simple-vchan $(DESTDIR)/usr/bin/pacat-simple-vchan
install -D pulse/qubes.AudioInputEnable $(DESTDIR)/etc/qubes-rpc/qubes.AudioInputEnable
install -D pulse/qubes.AudioInputDisable $(DESTDIR)/etc/qubes-rpc/qubes.AudioInputDisable
install -D shmoverride/X-wrapper-qubes $(DESTDIR)/usr/bin/X-wrapper-qubes
install -D shmoverride/shmoverride.so $(DESTDIR)$(LIBDIR)/qubes-gui-daemon/shmoverride.so
install -D -m 0644 gui-daemon/guid.conf $(DESTDIR)/etc/qubes/guid.conf
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Depends:
python3,
qubes-core-qrexec (>= 4.1.5),
qubes-utils (>= 4.1.4),
socat,
${shlibs:Depends},
${misc:Depends}
Recommends:
Expand Down
2 changes: 2 additions & 0 deletions debian/qubes-gui-daemon-pulseaudio.install
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
usr/bin/pacat-simple-vchan
etc/qubes-rpc/qubes.AudioInputEnable
etc/qubes-rpc/qubes.AudioInputDisable
4 changes: 4 additions & 0 deletions pulse/qubes.AudioInputDisable
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
[ -n "$1" ] || exit 1
control_socket="/var/run/qubes/audio-control.$1"
echo "audio-input 0" | socat -u - "UNIX-CONNECT:$control_socket"
4 changes: 4 additions & 0 deletions pulse/qubes.AudioInputEnable
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
[ -n "$1" ] || exit 1
control_socket="/var/run/qubes/audio-control.$1"
echo "audio-input 1" | socat -u - "UNIX-CONNECT:$control_socket"
5 changes: 3 additions & 2 deletions rpm_spec/gui-daemon.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Requires: qubes-utils >= 3.1.0
Requires: python%{python3_pkgversion}-pydbus
Requires: qubes-core-qrexec >= 4.1.5
Requires: qubes-utils >= 4.1.4
Requires: socat

BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: pulseaudio-libs-devel
Expand Down Expand Up @@ -146,8 +147,8 @@ rm -f %{name}-%{version}

%files -n qubes-audio-daemon
/usr/bin/pacat-simple-vchan
/usr/share/dbus-1/interfaces/org.qubesos.Audio.xml
%config(noreplace) /etc/dbus-1/system.d/org.qubesos.Audio.conf
/etc/qubes-rpc/qubes.AudioInputEnable
/etc/qubes-rpc/qubes.AudioInputDisable

%files -n qubes-gui-dom0
%config(noreplace) %{_sysconfdir}/qubes-rpc/policy/qubes.ClipboardPaste
Expand Down

0 comments on commit 2d86b15

Please sign in to comment.