AnLinux-App
AnLinux-App copied to clipboard
./start-kali.sh Autospawn Error Under tsu
I'm running Termux and AnLinux on Android 12. After I installed Kali Linux, when I try to use ./start-kali.sh
to run it under tsu
, it shows this error message.
~ $ ./start-kali.sh root@localhost:~# exit logout ~ $ tsu .../files/home # ./start-kali.sh W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified). E: [autospawn] core-util.c: Home directory not accessible: Unknown error 13 W: [autospawn] lock-autospawn.c: Cannot access autospawn lock. E: [pulseaudio] main.c: Failed to acquire autospawn lock root@localhost:~# exit logout .../files/home # exit exit ~ $
This error doesn't appear under non-tsu
.
I tried reinstalling it, but the error message still remains when I run Kali under tsu
. And I tried running Kali under tsu on Android 9, there is no error. But I don't know if the Android version effects it.
Please help me, thank you!
Yesterday there was an update to enable sound on all distro, but seems like root is not compatible with pulseaudio, but no worries, this will fix it, first run this command inside Termux, not the distro.:
echo "autospawn = no" >> ~/../usr/etc/pulse/client.conf
then install nano:
pkg install nano
then:
nano start-kali.sh
lastly:
remove the line pulseaudio --start, and replace it with:
if [ `id -u` = 0 ];then
pulseaudio --start --system
else
pulseaudio --start
fi
This check if you are running as root and start pulseaudio system wide if you do.
Please let me know if this works, also I will update the scripts so this wont happen in the future.
I changed the file /data/data/com.termux/files/usr/etc/pulse/client.conf
from
to
, and the file
/data/data/com.termux/files/home/start-kali.sh
from
to
.
There's still an error message of pulseaudio, but the message changed.
~ $ tsu .../files/home # ./start-kali.sh E: [pulseaudio] main.c: --start not supported for system instances. root@localhost:~# exit logout .../files/home # exit exit ~ $
And, whatever the autospawn
in client.conf
is set to be yes
or no
, the error message still remains the same.
E: [pulseaudio] main.c: --start not supported for system instances.
You need to run the command for the client.conf, not change the file manually...
echo "autospawn = no" >> ~/../usr/etc/pulse/client.conf
But if you want to change the command, remember to remove ";" from:
; autospawn = no
like this:
autospawn = no
But I suspect the problem is in the ./start-kali.sh, remove the copied command and change it to pulseaudio --start --system should fix it, I will look into this since I do not have rooted device now.
Actually I've already tried the various versions of
/data/data/com.termux/files/usr/etc/pulse/client.conf
before. Now I changed the command in /data/data/com.termux/files/home/start-kali.sh
to pulseaudio --start --system
, but the error remains the same.
~ $ tsu
.../files/home # ./start-kali.sh
E: [pulseaudio] main.c: --start not supported for system instances.
root@localhost:~# exit
logout
.../files/home # exit
exit
~ $
As long as you change
pulseaudio --start
## For rooted user:pulseaudio --start --system
to
## pulseaudio --start
## For rooted user:
pulseaudio=" --start --system"
in the start-kali.sh file, there will be no errors.
As long as you change
pulseaudio --start ## For rooted user:pulseaudio --start --system
to
## pulseaudio --start ## For rooted user: pulseaudio=" --start --system"
in the start-kali.sh file, there will be no errors.
Cheers! It did work!
But, could you please explain why? Because pulseaudio --start --system
doesn't work, and this is what I get when I use it.