~ $ pkill -9 -f com.termux.x11 true pkill -9 -f pipewire true sleep 1 echo "--- Starting services..." # Set up Termux directories export TMPDIR=/data/data/com.termux/files/usr/tmp export XDG_RUNTIME_DIR=/data/data/com.termux/files/usr/tmp # Start X11 Server and PipeWire Audio Server in Termux termux-x11 :0 & pipewire & pipewire-pulse & echo "--- Waiting for X socket..." COUNT=0 while [ ! -e "$XDG_RUNTIME_DIR/.X11-unix/X0" ] && [ $COUNT -lt 15 ]; do sleep 0.5; echo -n "."; COUNT=$((COUNT+1)) done echo if [ ! -e "$XDG_RUNTIME_DIR/.X11-unix/X0" ]; then echo "Error: X server failed to start." >&2; exit 1 fi echo "--- X socket ready! Granting access..." sleep 1 # Give the server a moment to stabilize export DISPLAY=:0 xhost + echo "--- Logging into Kali environment..." proot-distro login --user kali kali \ --shared-tmp \ --bind "$XDG_RUNTIME_DIR/.X11-unix:/tmp/.X11-unix" \ -- /bin/bash -lc ' # Set variables for apps inside Kali export DISPLAY=:0 export MESA_LOADER_DRIVER_OVERRIDE=kgsl export TU_DEBUG=noconform # Tell Kali to connect to the audio server running in Termux export PULSE_SERVER=127.0.0.1 echo "--- Checking OpenGL Renderer ---" glxinfo | grep "OpenGL renderer string" echo "--- testing with xfce4 term---" xfce4-terminal & # Wait a few seconds for the terminal to appear, then run glxgears sleep 5 && glxgears ' [1] Killed termux-x11 :0 [2]- Killed pipewire [3]+ Killed pipewire-pulse --- Starting services... [1] 18111 [2] 18112 [3] 18113 --- Waiting for X socket... --- X socket ready! Granting access... [W][33062.427210] pw.context | [ context.c: 466 pw_context_new()] 0xb400007d91eb4ec0: can't load dbus library: support/libspa-dbus [W][33062.427367] pw.context | [ context.c: 466 pw_context_new()] 0xb400007306e6e260: can't load dbus library: support/libspa-dbus [W][33062.427800] mod.rt | [ module-rt.c: 1118 pipewire__module_init()] regular realtime scheduling not available (Portal/RTKit fallback disabled) [W][33062.427901] mod.rt | [ module-rt.c: 1118 pipewire__module_init()] regular realtime scheduling not available (Portal/RTKit fallback disabled) [W][33062.435187] mod.protocol-pulse | [ server.c: 622 start_unix_server()] server 0xb4000072a6e694f0: unlinking stale socket '/data/data/com.termux/files/usr/tmp/pulse/native' access control disabled, clients can connect from any host --- Logging into Kali environment... ┏━(Message from Kali developers) ┃ ┃ This is a minimal installation of Kali Linux, you likely ┃ want to install supplementary tools. Learn how: ┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/ ┃ ┗━(Run: “touch ~/.hushlogin” to hide this message) ┏━(Message from Kali developers) ┃ ┃ This is a minimal installation of Kali Linux, you likely ┃ want to install supplementary tools. Learn how: ┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/ ┃ ┗━(Run: “touch ~/.hushlogin” to hide this message) --- Checking OpenGL Renderer --- OpenGL renderer string: zink Vulkan 1.4(Turnip Adreno (TM) 740 (MESA_TURNIP)) --- testing with xfce4 term--- xfce4-terminal-Message: 08:28:05.866: Your Terminal settings have been migrated to Xfconf. The config file "/etc/xdg/xfce4/terminal/terminalrc" is not used anymore. (xfce4-terminal:18826): xfce4-terminal-WARNING **: 08:28:05.960: Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 2345 frames in 5.0 seconds = 468.948 FPS 2294 frames in 5.0 seconds = 458.647 FPS 2250 frames in 5.0 seconds = 449.990 FPS 2248 frames in 5.0 seconds = 449.504 FPS