Михаил Юдин

Two way sound in Termux with proot-distro

Two way sound in Termux with proot-distro

Making possible to get microphone input on proot distros.

At first

Allow access to microphone for TermuxApi app.

In Termux, setup proot-distro:

pkg install proot-distro sox
proot-distro install ubuntu

Environment setup

In proot, make user, install vnc server:

proot-distro login ubuntu

useradd user
mkdir /home/user/
chown user:user /home/user/

apt install tightvncserver xfce4


Audio setup

In Termux:

nano $PREFIX/etc/pulse/default.pa

Add this lines into this file (in static load section):

load-module module-sles-sink
load-module module-sles-source
load-module module-null-sink sink_name=virtspk sink_properties=device.description=Virtual_Speaker
load-module module-native-protocol-tcp auth-ip-acl= auth-anonymous=1

Run pulseaudio in Termux:

pulseaudio --start

Starting desktop

Login as new user and edit vnc xstartup file to run xfce4 by default:

proot-distro login --user user ubuntu
nano ~/.vnc/xstartup

Replace /etc/X11/Xsession with xfce4-session &, press Ctrl-X, y, enter.

Then run vnc server:


Make OpenSL ES input as default input device to use mic as input in most of apps.

If there is questions, ask me. Will improve this manual.

Поблагодарить через СберБанк:


Остались вопросы или есть пожелания, замечания — пишите в комментарии: