f9a9ce3167
* Let Termux:X11 run without sharedUserId="com.termux" Make Termux:X11 start user-defined commands in Termux ($PREFIX/libexec/termux-x11/termux-startx11) Make debug_build.yml build companion package for termux and upload it as an artifact. Update README.md
25 lines
454 B
Bash
Executable File
25 lines
454 B
Bash
Executable File
#!/data/data/com.termux/files/usr/bin/bash
|
|
DISPLAYNO=0
|
|
|
|
socket_is_open() {
|
|
local SOCKET=$PREFIX/tmp/.X11-unix/X$DISPLAYNO
|
|
local NULL=/dev/null
|
|
socat -u OPEN:$NULL UNIX-CONNECT:$SOCKET > $NULL 2>&1
|
|
return $?
|
|
}
|
|
|
|
/data/data/com.termux/files/usr/bin/termux-x11 :$DISPLAYNO &
|
|
|
|
{
|
|
#kill this script if termux-x11 is not up after 10 seconds
|
|
sleep 10
|
|
kill $$
|
|
} &
|
|
|
|
until socket_is_open; do
|
|
sleep 0.1
|
|
done
|
|
|
|
export DISPLAY=:$DISPLAYNO
|
|
exec x-session-manager
|