speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: speech-dispatcher and userspace chroot environment on Android


From: Mgr. Janusz Chmiel
Subject: RE: speech-dispatcher and userspace chroot environment on Android
Date: Wed, 27 May 2020 19:02:53 +0200

Termux is accessible not only with Talkback thanks to Java code, which have
been primarily suggested by MR Peter Vagner. After discussion with core
developers for Termux, official java code have been added and it is accepted
for many months.
To be honest, ideal RAm configuration if 4 GB no less, 2 GB is absolute
minimum.
Yes, I have successfully used Mate desktop environment but currently mate
panels do not work as it should. So you can switch between windows, but I do
not know how apps icons with context menus will work.

To be able to work with graphical desktop, you will have to install VNC
protocol support. If you want graphical output, not only keyboard
interaction, XVFB package work. But if you will use graphical support with
XVFB you can anticipate many errors on terminal console related to graphics.
Keep in mind, that you will not run full Linux operating system if your
device is not rooted. Ans as You know, rooting modern Android device safely
is very complex and dangerous.
So you will not be able to use system services and apps which communicate
with system bus or with systemd will not work.
Shared memory is also not 100 % solved. There are two approachsfor this. My
preferred one work, but if app uses many shared memory calls at The same
time, it fails.
Experienced C programmer would really solve this, but it is too complex for
Me.

So here are my working instructions.

Install Termux from Google Play

Run it. For some initial setup, you would need to use SSH protocol support.
Because using Termux from Android is not so perfectly supported like running
standard Android app.
Type The following commands from termux
apt update
apt upgrade
If there is some upgrade, confirm it.
apt install dropbear
passwd
type yours password to be usable from SSH session
You will have to type password twice
Then type dropbear

apt clean
apt install wget proot pulseaudio sox
To have professional sound support, you have two possibilityes.
Use TCP/IP sockets, in this case you will have The opportunity to use even
several Linux distros and you will not need to change profile script.
Or you will use perhaps faster Unix socket to communicate with Pulseaudio.
Somebody have told Me, that Unix sockets are faster than TCP/IP sockets. But
I can not determine if is it true or no.

So edit profile script from termux.
apt install nano

nano /data/data/com.termux/files/usr/etc/profile

and add those lines at The end of The script file.
pulseaudio --start --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
auth-anonymous=1
If you would need to use UNIX sockets instead, add The following lines.

pulseaudio --start --exit-idle-time=-1
pactl load-module module-native-protocol-unix
socket=/data/data/com.termux/files/home/arch/tmp/pulse.sock auth-anonymous=1
Sure. Arch was only example for my preffered ArhLinux distro.
On yours running Arch Linux you would had to add

export PULSE_SERVER=unix:/tmp/pulse.sock

If You will use TCP/IP socket you would had to add
echo "export PULSE_SERVER=\"127.0.0.1\"" >> ~/.bashrc
Install Arch Linux by using The following script
wget
https://raw.githubusercontent.com/TermuxArch/TermuxArch/master/setupTermuxAr
ch.bash

run chmod +x setupTermuxArch.bash
then run The script by typing
./setupTermuxArch.bash

If you will occur errors while extracting, then yours Android variant have
issues with Proot. In this case, debate on Proot Github issues page, MR
Bednarski and others have deep knowledge of Kernel, C language and if it
would be possible, they would release Proot which will be compatible with
yours device model. Some models have other ANdroid variant as supposed from
Proot source code.
If setupTermuxArch.bash script will finish installing Arch Linux
successfully, add Pulseaudio needed line to The profile.
Type exit to logout and type startarch to return to The archlinux.
You will need to create user account without The Rroot  privileges.

type addauser noran
noran is The example of user name.
You will always run XVFB x11vnc and mate from this account to prevent
problems with accessibility.
Add The following lines to profile script

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export DISPLAY=:0
And then install The following packages
xorg-server-xvfb
x11vnc
Install mate and orca by typing
pacman -S orca espeak-ng pulseaudio mate mate-extra
You will need reliable Android VNC client app, which support reliably
hardware keyboard. And this is The most painful problem.
Finding even commercial one is noe easy. To be able to use it with Talkback
and to support hardware keyboard perfectly.
I have found The following app

https://play.google.com/store/apps/details?id=com.iiordanov.freebVNC&hl=en_U
S

When you will install mate, orca and other apps, you will be able to use
mate desktop environment with Orca.
logout from ArchLinux by typing exit
startarch
su username
such as
su noran
Xvfb :1 -screen 0 640x480x24 &
x11vnc -display :0 -bg -nopw -listen localhost -xkb -forever -ncache 10
-ncache_cr -noshm

setup bVNC Android applicationas follows
IP address
127.0.0.1
port 
5900
I have tried tigervnc but mate-session have always crashed.
To be able to use mate and orca
type marco &
dbus-run-session orca --setup &
So you will be able to adjust Orca preferences, set keyboard layout and set
some voice preferences.
Press OK button to confirm The changes.
Then you will have to run mate-control-center to change mate build in hod
keys. Scan codes differs from standard IBM/PC compatible machine.
So you will have to add new hod key to activate run dialog box and to
display apps.
Keyboard shortcuts allow you to do that.
If you will find better free VNC client for Android which support numeric
Insert and other keys better, so Orca will not recognize Shift as enabled or
Capslock key, let Me know.

To run mate simply type
mate-session
without &
because mate-session auto suspend its threads automatically when &
is being used and when you will press Enter in Termux session.
It is new update of mate-session.
I will try to kindly debate with Mate developers why they have done this.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]