>_TERNUXARM64 / ON-DEVICE LINUX
বাংলা
MENU
HomeDocsConfiguration
TERNUX · DOCUMENTATION

Configuration

Every ternux setting explained: launcher environment variables, GPU routes, audio bridge, locale, fonts and where each file lives.

ternux installs with sensible defaults, and everything can be tuned. This page explains every knob, where it lives, and why it is set the way it is.


Install-time choices

Setting Default Notes
--user NAME ternux Guest user created inside each selected container
--locale LANG en_US.UTF-8 Desktop locale (see below for Bangla)
--backend auto auto selects Mesa Zink/Turnip on Adreno/KGSL only for profiles with pinned assets (Debian, Ubuntu, Kali, Alpine, Arch Linux, Fedora, openSUSE, Void and Deepin); Kali Rolling uses a pinned Debian Testing overlay. Other profiles and GPU families use VirGL, then llvmpipe if its GL preflight cannot confirm VirGL
--zsh off Switch the Termux shell to zsh as well
--with-* none Optional workload profiles

To change the user or locale after installation, run the installer with the new value without --resume, because resume skips phases already recorded as complete: bash install.sh --user X --locale bn_BD.UTF-8 --yes. Back up first; creating a new account does not migrate the old account's home automatically.

Bangla locale

bash install.sh --locale bn_BD.UTF-8

This generates the bn_BD.UTF-8 locale inside Debian and installs Noto/Symbola font coverage, so Bangla renders correctly in the desktop terminal and apps.


Installer output

The installer's renderer is a display choice only. Whatever the screen can show, the complete output of every phase is appended to $TERNUX_LOG_DIR/ternux.log.

Variable Default Effect
TERNUX_UI auto auto, dashboard, plain or off — the same values as --ui
TERNUX_NO_ANIM unset 1 freezes the spinner and colour cycling; the dashboard still updates
TERNUX_QUIET 0 Suppresses shared status messages and disables the frame
TERNUX_JSON 0 Requests structured output where a command documents it; disables the frame
TERNUX_YES unset 1 accepts the documented defaults without prompting, like --yes
TERNUX_LOG_DIR $TMPDIR/ternux Directory for ternux.log and the install stream log
TERNUX_STATE_DIR ~/.local/share/ternux Phase state, saved install choices, saved profiles
TERNUX_COLS, TERNUX_ROWS unset Force a frame geometry; intended for tests and reproducible transcripts

Renderer selection is explained in Installation → The installer screen. The guest-profile and optional-workload pickers share one keyboard checklist: Up/Down or j/k moves, Space or a number toggles an item, and Enter confirms. When raw-key input is unavailable, the profile picker accepts comma-separated numbers or names. Before installation, the dashboard summarizes the selected guests and workloads. A failed optional workload leaves a successfully verified base guest ready, displays a warning, and can be retried with ternux install --resume; the command still returns nonzero so automation can detect the optional failure.


Per-guest desktop launchers

Each guest gets a generated launcher at ~/.local/share/ternux/distros/NAME/launcher.sh, configured for its GPU route and syntax-checked at install time. Edit it freely; reinstalling that guest regenerates the launcher and replaces your edits.

Zink (Adreno) environment

MESA_LOADER_DRIVER_OVERRIDE=zink   Select Zink for normal desktop OpenGL apps
GALLIUM_DRIVER=zink                Scoped to workloads such as Blender; not global
TU_DEBUG=noconform                 Turnip compatibility workaround; render-mode selection stays adaptive
MESA_VK_WSI_DEBUG=sw               Software WSI — avoids X11/Vulkan surface issues
MESA_DISK_CACHE_SINGLE_FILE=1      Shader cache as one file, faster warm starts
MESA_SHADER_CACHE_MAX_SIZE=2048M   Cap so the cache can't eat all storage
QT_X11_NO_MITSHM=1 / _X11_NO_MITSHM=1  Disable MIT-SHM (broken over X11 here)
XDG_RUNTIME_DIR=~/.runtime         Required by dbus/GTK apps
--bind /dev/kgsl-3d0               Expose the Adreno kernel node to the container

Mesa keeps its shader cache in the Debian user cache across desktop restarts; the launcher does not redirect it into shared /tmp. ternux repair can clear that cache when repairing a graphics issue.

The desktop applies its bundled theme, wallpaper and no-compositor defaults once for each Debian user. On Termux:X11, the default wallpaper targets Xfce's active builtin output. A one-time migration repairs only an empty, missing, or Debian stock wallpaper path; a readable custom wallpaper remains untouched. Later starts skip these settings and wallpaper reload, so startup does less work and personal theme changes remain in place.

Why the cache tweaks? The phone's storage is slow flash; a single-file, size-capped cache keeps app warm-starts fast without letting Mesa silently consume gigabytes. Turnip is left to choose system-memory or tile-memory rendering per workload; its forced sysmem debug mode is omitted.

VirGL environment

GALLIUM_DRIVER=virpipe              Route GL over the VirGL pipe
MESA_GL_VERSION_OVERRIDE=4.3COMPAT  Advertise OpenGL 4.3 compatibility to apps
MESA_GLES_VERSION_OVERRIDE=3.2

The host-side virgl_test_server_android process is started before the container; the launcher warns loudly if it fails to start (otherwise the session silently falls back to software rendering).


Audio

Three cooperating pieces:

Where What
Termux $PREFIX/etc/pulse/default.pa TCP bridge module on 127.0.0.1:4713, OpenSL sink as default
Launcher starts pulseaudio before the container, loads the bridge
Debian ~/.config/pulse/client.conf default-server = tcp:127.0.0.1:4713

Why loopback-only? The bridge crosses the container boundary over TCP, so an anonymous ACL is needed — an explicit listen=127.0.0.1 keeps it off the LAN. Other same-device clients can still reach a loopback listener. Never change the listener to 0.0.0.0 without replacing anonymous access with deliberate authentication and firewalling.

To pick a different sink (Bluetooth, headphones), change the set-default-sink line in default.pa and restart the session (killx, then tx start).


Fonts

Installed inside Debian:

  • fonts-noto-color-emoji — emoji
  • fonts-symbola, fonts-font-awesome, fonts-powerline — symbol coverage
  • JetBrainsMono Nerd Font — terminal icon glyphs, downloaded once into ~/.local/share/fonts (sentinel file prevents re-downloads)

Add more fonts any time: drop the files in ~/.local/share/fonts and run fc-cache -f.


State files

Path Purpose
~/.local/share/ternux/state Saved install choices and shared configuration
~/.local/share/ternux/phases Shared host phases plus aggregate compatibility markers
~/.local/share/ternux/distros/<name>/phases Successful guest phases used by --resume for that guest only
~/.local/share/ternux/distros/<name>/profile Per-guest readiness, user, display and backend settings
$TMPDIR/ternux/ternux.log Full log of the last installer run (default: $PREFIX/tmp/ternux/ternux.log)

Deleting ~/.local/share/ternux discards saved configuration and all guest completion records. --resume skips a successful guest phase only for the same guest; older installs without a per-guest phase file rerun guest setup safely. Do not use --resume to repair an already completed artifact; use the relevant ternux repair path or rerun the installer without --resume, with a backup first.


Override variables

Two paths that detection reads can be overridden. They exist so the test suite can run on real Adreno hardware instead of only on a GPU-less CI host, and so that no test can reach an actual installation. Production defaults are unchanged.

Variable Default Effect
TERNUX_DISTRO debian The PRoot-Distro guest selected for installation; --distro sets it. Named profiles provide family-matched desktop recipes for APT (Debian, Ubuntu, Kali, Deepin, Pardus), APK (Alpine, Adelie, Chimera), pacman (Arch Linux, Artix, Manjaro), DNF (Fedora, Rocky Linux), Zypper (openSUSE), and XBPS (Void). Debian, Ubuntu, and Alpine are the device-qualified v2 profiles on one Adreno 825 device. The owner reports physical keyboard input switching in all installed distros; a focused live Alpine Xfce Terminal check on 2026-11-16 also switched Avro with synthetic Ctrl+Space. These checks do not qualify every application. The other profiles remain physically unqualified. Arbitrary OCI images are supported as shell guests without an automatic desktop recipe.
TERNUX_THEME p10k none installs zsh without powerlevel10k. --no-theme sets it.
TERNUX_KGSL_DEVICE /dev/kgsl-3d0 The device node that GPU, Vulkan and backend detection probe. Pointing it at a path that does not exist makes auto resolve to VirGL — what a non-Adreno device sees.
TERNUX_HOST_PREFIX /data/data/com.termux/files/usr Where uninstall.sh looks for an installed host CLI before falling back to a local checkout or a download.

Neither belongs in normal use. TERNUX_KGSL_DEVICE pointed at an existing file that is not a KGSL node would let the Zink route be selected on hardware that cannot run it.


Held Mesa packages (Zink route)

db
sudo apt-mark showhold        # expect: mesa-vulkan-drivers libgl1-mesa-dri ...

These are held so a routine apt upgrade cannot replace the Turnip-backed path with stock Mesa and silently switch you to llvmpipe. Upgrade them deliberately:

sudo apt-mark unhold mesa-vulkan-drivers libgl1-mesa-dri libglx-mesa0 libgbm1 libegl-mesa0
sudo apt upgrade
sudo apt-mark hold mesa-vulkan-drivers libgl1-mesa-dri libglx-mesa0 libgbm1 libegl-mesa0

…then verify the renderer string again (glxinfo | grep renderer).


ternux — Copyright (c) 2026 Sobuj Miah (@soobujmiah) · Apache-2.0