diff --git a/docs/en/Addons.md b/docs/en/Addons.md new file mode 100644 index 0000000000..81227c4b2e --- /dev/null +++ b/docs/en/Addons.md @@ -0,0 +1,8 @@ +Termux has some extra features. You can add them by installing addons: + +- [Termux:API](Termux:API): Access Android and Chrome hardware features. +- [Termux:Boot](Termux:Boot): Run script(s) when your device boots. +- [Termux:Float](Termux:Float): Run Termux in a floating window. +- [Termux:Styling](Termux:Styling): Have color schemes and powerline-ready fonts customize the appearance of the Termux terminal. +- [Termux:Tasker](Termux:Tasker): An easy way to call Termux executables from Tasker and compatible apps. +- [Termux:Widget](Termux:Widget): Start small scriptlets from the home screen. diff --git a/docs/en/Audio_Editors.md b/docs/en/Audio_Editors.md new file mode 100644 index 0000000000..730727d4c0 --- /dev/null +++ b/docs/en/Audio_Editors.md @@ -0,0 +1,6 @@ +Audio editing software is software which allows editing and generating +of audio data. Audio editing software can be implemented completely or +partly as library, as computer application, as Web application or as a +loadable kernel module. + +## [ffmpeg](ffmpeg) diff --git a/docs/en/Backing_up_Termux.md b/docs/en/Backing_up_Termux.md new file mode 100644 index 0000000000..fa84194626 --- /dev/null +++ b/docs/en/Backing_up_Termux.md @@ -0,0 +1,110 @@ +This page shows an example of backing up your Termux installation. +Instructions listed there cover basic usage of archiving utility "tar" +as well as show which files should be archived. **It is highly +recommended to understand what the listed commands do before +copy-pasting them.** Misunderstanding the purpose of each step may +irrecoverably damage your data. If that happened to you - do not +complain. + +# Backing up + +In this example, a backup of both home and sysroot will be shown. The +resulting archive will be stored on your shared storage (`/sdcard`) and +compressed with `gzip`. + +1\. Ensure that storage permission is granted: + +`termux-setup-storage` + +2\. Backing up files: + +`tar -zcf /sdcard/termux-backup.tar.gz -C /data/data/com.termux/files ./home ./usr` + +Backup should be finished without any error. There shouldn't be any +permission denials unless the user abused root permissions. If you got +some warnings about socket files, ignore them. + +**Warning**: never store your backups in Termux private directories. +Their paths may look like: + +`/data/data/com.termux                       - private Termux directory on internal storage` +`/sdcard/Android/data/com.termux             - private Termux directory on shared storage` +`/storage/XXXX-XXXX/Android/data/com.termux  - private Termux directory on external storage, XXXX-XXXX is the UUID of your micro-sd card.` +`${HOME}/storage/external-1                  - alias for Termux private directory on your micro-sd.` + +Once you clear Termux data from settings, these directories are erased +too. + +# Restoring + +Here will be assumed that you have backed up both home and usr directory +into same archive. Please note that all files would be overwritten +during the process. + +1\. Ensure that storage permission is granted: + +`termux-setup-storage` + +2\. Extract home and usr with overwriting everything. Pass +`--recursive-unlink` to remove any junk and orphaned files. Pass +`--preserve-permissions` to set file permissions as in archive, ignoring +the umask value. By combining these extra options you will get +installation state exactly as was in archive. + +`tar -zxf /sdcard/termux-backup.tar.gz -C /data/data/com.termux/files --recursive-unlink --preserve-permissions` + +Now close Termux with the "exit" button from notification and open it +again. + +# Using supplied scripts + +The latest version of package "termux-tools" contains basic scripts for +backup and restore of Termux installation. They are working in a way +similar to tar commands mentioned above. + +**These scripts backup and restore scripts will not backup, restore or +in any other way touch your home directory.** Check out the +[notice](https://github.com/termux/termux-packages/blob/06499edb90a16fa471cff739ffee634f42a73913/packages/termux-tools/termux-restore#L6-L34) +if have questions why so. Termux developers are not responsible with +what you are doing with your files. If you managed to lost data, that +would be your own problem. + +## Using termux-backup + +Simple backup with auto compression: + +`termux-backup /sdcard/backup.tar.xz` + +Compression format is determined by file extension, which is typically +.tar.gz (gzip), .tar.xz (xz) or .tar (no compression). + +It is possible to stream backup contents to standard output, for example +to encrypt it with GnuPG utility or send to remote storage. Set file +name as "-" to enable streaming to stdout: + +`termux-backup - | gpg --symmetric --output /sdcard/backup.tar.gpg` + +Content written to stdout is not compressed. + +## Using termux-restore + +**Warning**: restore procedure will destroy any previous data stored in +\$PREFIX. Script will perform a complete rollback to state state exactly +as in backup archive. + +Restoring backup is also simple: + +`termux-restore /sdcard/backup.tar.xz` + +Once finished, restart Termux application. + +The utility `termux-restore` is able to read backup data from standard +input. You can use this for reading content supplied by other tool. +Backup contents supplied to stdin must not be compressed. See below +example for restoring from encrypted, compressed backup: + +`export GPG_TTY=$(tty)` +`gpg --decrypt /sdcard/backup.tar.gz.gpg | gunzip | termux-restore -` + +Please note that if restore procedure will be terminated before finish, +your environment will be corrupted. \ No newline at end of file diff --git a/docs/en/Building_packages.md b/docs/en/Building_packages.md new file mode 100644 index 0000000000..d18cbecc7a --- /dev/null +++ b/docs/en/Building_packages.md @@ -0,0 +1,116 @@ +# Building packages + +## Using Termux build environment + +A recommended way of building is to use official build environment +available on Github: . See +[Termux Developer's +Wiki](https://github.com/termux/termux-packages/wiki) for tips about its +usage. + +- - + setting up build environment. + + + +- - + how to build a package. + + + +- - + information about writing package scripts (build.sh). + +### On-device usage + +It is possible to use our build environment directly on device without +Docker image or VM setup. You need only to: + +1\. Clone the git repository: + + git clone https://github.com/termux/termux-packages + +2\. Execute setup script: + +`cd termux-packages` +`./scripts/setup-termux.sh` + +Packages are built by executing `./build-package.sh -I package_name`. +Note that option "-I" tells build-package.sh to download and install +dependency packages automatically instead of building them which makes +build a lot faster. + +By default, with Termux build environment you can build only existing +packages. If package is not exist in `./packages` directory, then you +will have to write its build.sh manually. + +**If you managed to successfully build a new package, consider to make a +pull request.** + +Some notes about on-device building: + +- Some packages are considered as unsafe for building on device as they + remove stuff from `$PREFIX`. + + + +- During build process, the compiled stuff is installed directly to + `$PREFIX` and is not tracked by dpkg. This is expected behaviour. If + you don't want this stuff, install generated deb files and uninstall. + + + +- Some packages may throw errors when building on device. This is known + issue and tracked in + . + + + +- On-device package building for android-5 branch is not tested well. + +## Manually building packages + +There no universal guide about building/porting packages in Termux, +especially since Termux isn't a standard platform. + +Though you can follow some recommendations mentioned here: + +1\. Make sure that minimal set of build tools is installed: + +`pkg install build-essential` + +2\. After extracting package source code, check for files named like +"README" or "INSTALL". They usually contain information about how to +build a package. + +3\. Autotools based projects (have ./configure script in project's root) +in most cases can be built with the following commands: + +`./configure --prefix=$PREFIX` +`make && make install` + +It is highly recommended to check the accepted configuration options by +executing `./configure --help`. + +In case of configuration failure, read the output printed on screen and +check the file `config.log` (contains a lot of text, but all information +about error's source exist in it). + +4\. CMake based projects (have CMakeLists in project's root) should be +possible to build with: + +`mkdir build` +`cd build` +`cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" ..` +`make` +`make install` + +Be careful when running `make install` as it will unconditionally write +files to `$PREFIX`. Never execute any of build commands as root. + +**Note about "bug reports":** if you trying to build custom package and +it fails, do not submit bug reports regarding it. + +**Note about "package requests":** if you decided to submit a package +request for package that you can't build, make sure this package will be +useful for others. Otherwise such requests will be just rejected. \ No newline at end of file diff --git a/docs/en/Community.md b/docs/en/Community.md new file mode 100644 index 0000000000..cfed10ba5a --- /dev/null +++ b/docs/en/Community.md @@ -0,0 +1,38 @@ +Any questions after reading the [FAQ](FAQ)? Consider joining +us with a cup of herbal tea, and similar. Termux is a distributed +community worldwide. Here are a few ways to get in touch: + +## Official communities + +- **Homepage** : +- **Github** : +- **Gitter** : +- **Discord** : +- **[IRC](IRC)** : Channel \#Termux on + [libera.chat](https://libera.chat/) +- **Email** : [termux+subscribe@groups.io](https://groups.io/g/termux) +- **Reddit** : +- **Facebook** : +- **Twitter** : +- **Telegram** : +- **YouTube** : + + +### Rules + +## Other (non-official) communities + +Here is a list of non-official communities. Termux developers are not +responsible about any information or misinformation, site links and +files distributed in these communities. + +- **Facebook Group** : +- **Telegram Chinese community**: +- **Telegram Ethiopian community**: + +- **Telegram Spanish community**: +- **QQ Chinese community**: + +# See Also + +- [Development](Development) \ No newline at end of file diff --git a/docs/en/Community_Rules.md b/docs/en/Community_Rules.md new file mode 100644 index 0000000000..6ff5215ef3 --- /dev/null +++ b/docs/en/Community_Rules.md @@ -0,0 +1,63 @@ +Official communities are curated by [@termux +developers](https://github.com/orgs/termux/people) or by trusted person. +Each community follows these rules with no exceptions unless specified +otherwise: + +**1. Please use English.** + +Our community is international and English here is a standardized +language which makes easier to follow conversations. + +**2. Use of Termux for digital threatening is not tolerated.** + +We discourage use of Termux application as base for digital threatening, +including but not limited to hacking, phishing or spying. Even though +Termux is known to be successfully used by penetration testing +professionals, we do not provide any kind of assistance related to +potentially destructive Termux use cases. Therefore we kindly asking our +community participants to abstain from asking for help with mentioned +topics or we will have to finish your membership. + +Publications violating this rule will be deleted. Users violating this +rule may receive a permanent ban. + +**3. Explicitly toxic behavior, trolling and flood are not tolerated.** + +Deliberate offensiveness against specific persons or whole community, as +well as any behavior aimed at disrupting conversations, is strongly +discouraged. + +Publications violating this rule will be deleted. Users violating this +rule may receive a temporary or permanent ban. + +**4. Our topic is Termux, its use cases, user experience and content +share.** + +Our communities are solely about Termux, its use cases, usage experience +and content produced by community members. + +Little off-topic is okay, but abuse of or community for gathering +knowledge about custom ROMs, custom kernels, Android OS, networking, +programming, general computer science and basics is strongly +discouraged. If you are looking for help with topic that is not directly +connected with Termux project, please consider looking into more +suitable communities and Internet resources. + +You should not post any kind of information that discourage use of +Termux application and its packages in the context of advertising own or +third-party "better" utility. + +Off-topic publications will be removed. Publications with inappropriate +content (nsfw, gambling, lotteries, etc) will lead to permanent ban of +their author. + +**5. Avoid direct messaging to Termux maintainers.** + +Please use community social media to ask questions about Termux. + +Do not ask Termux developers for every single question about Termux, +especially when it comes about utility usage or how to get started. We +have community pages on various social media sites where you can ask +your questions or share some Termux-related content. + +[See the available Community Pages](Community). \ No newline at end of file diff --git a/docs/en/Compiling_and_setting_up_OCaml.md b/docs/en/Compiling_and_setting_up_OCaml.md new file mode 100644 index 0000000000..0438ab4a5a --- /dev/null +++ b/docs/en/Compiling_and_setting_up_OCaml.md @@ -0,0 +1,66 @@ +# OCaml + Termux + +OCaml native on android! + +This is a copy of the original article, available at + + +## Install + +*Use binary OPAM package for aarch64 to build OCaml* + +1\. Install OPAM + + echo "deb [arch=all,aarch64] http://ygrek.org.ua/files/debian/termux ./" >> data/data/com.termux/files/usr/etc/apt/sources.list + apt-get update # repository is not signed for now :] + pkg install opam + +2\. Install OCaml + + opam init --comp=4.03.0+termux termux https://github.com/camlunity/opam-repository.git#termux + +## Build + +*Build OCaml to build OPAM to build OCaml* + +1\. Prepare proper build environment. + +`pkg install build-essential diffutils m4 patch` + +2\. NB termux lacks `/bin/sh` (and all other standard unix file paths +for that matter), so the main problem during builds is hardcoded shell +path in . + +To overcome it - use `sh ./script` instead of just `./script`. + +3\. Build OCaml + + mkdir ~/tmp + export TMPDIR=$HOME/tmp # add to ~/.profile + git clone https://github.com/ygrek/ocaml.git -b termux-4.03.0 + cd ocaml + sh ./configure -prefix $PREFIX + make world.opt install + +4\. Build OPAM + + curl -LO https://github.com/ocaml/opam/releases/download/1.2.2/opam-full- + 1.2.2.tar.gz + tar -xzf opam-full-1.2.2.tar.gz + cd opam-full-1.2.2/ + sed -i 's|/bin/sh|sh|' src/core/opamSystem.ml OCamlMakefile + CONFIG_SHELL=sh sh ./configure -prefix "$PREFIX" + OCAMLPARAM="safe-string=0,_" make lib-ext all install + +5\. Add OPAM remote with Termux patches + + opam remote add termux https://github.com/camlunity/opam-repository.git#termux + +6\. Install OCaml via OPAM and remove system OCaml (built in step 3) to +avoid confusion with OPAM switches + + opam sw 4.03.0+termux # 4.02.3+termux 4.04.0+termux + rm /data/data/com.termux/files/usr/man/man1/ocaml* + rm /data/data/com.termux/files/usr/bin/ocaml* + rm -rf /data/data/com.termux/files/usr/lib/ocaml + opam sw remove system \ No newline at end of file diff --git a/docs/en/Contact.md b/docs/en/Contact.md new file mode 100644 index 0000000000..99aa29600b --- /dev/null +++ b/docs/en/Contact.md @@ -0,0 +1 @@ +1. REDIRECT [Community](Community) \ No newline at end of file diff --git a/docs/en/Development.md b/docs/en/Development.md new file mode 100644 index 0000000000..0e14129025 --- /dev/null +++ b/docs/en/Development.md @@ -0,0 +1,162 @@ +The information on this page, while public, will primarily be of +interest to Termux developers. + +## Development Mailing List + +We have a [mailing list](https://groups.io/g/termux-dev), but it is not +really in use. If more Termux users would sign up please, it could +really be in use: + +- + + + +- Help: termux-dev+help@groups.io + +## Weekly Development Sessions + +We currently do not perform the Weekly Development Sessions. + +- [Protocols and upcoming + sessions](Dev:_Development_Sessions) + +## Channels + +Here is a list of channels of the Termux project, what they are for, and +who has special rights and responsibilities for them. + +### GitHub Organization + +- Link: +- Purpose: Termux Repositories +- Collaborators: See + [termux/people](https://github.com/orgs/termux/people) + +### Community Forum + +- Link: +- Purpose: General user community for Termux. +- Moderators: [fornwall](https://www.reddit.com/user/fornwall), + [glow(Neo_Oli)](https://www.reddit.com/user/Neo_Oli) + +### User Mailing List + +- Help: termux+help@groups.io +- Join: +- Link: +- Moderators: fornwall, glow, Grimler91 +- Purpose: Mailing list for user discussions. + +### Developer Mailing List + +- Help: termux-dev+help@groups.io +- Join: +- Link: +- Moderators: fornwall, glow, Grimler91 +- Purpose: Mailing list to discuss Termux development. + +### Wiki + +- Link: +- Purpose: Help pages +- Administrators: [glow](User:Glow), + [Auxilus](User:Auxilus), + [Fornwall](User:Fornwall) +- Hosting and Maintenance: [glow](User:Glow) + +### Gitter User Channel + +- Link: +- Purpose: User Discussion +- Moderators: fornwall, glow(Neo-Oli), Grimler91 + +### Gitter Development Channel + +- Link: +- Purpose: Discussion about Termux development +- Moderators: fornwall, glow(Neo-Oli), Grimler91 + +### IRC User Channel + +- Link: \#termux @ libera.chat +- Purpose: User Discussion. Mirrored to Gitter User Channel +- Moderators: fornwall, glow(frumpylava), Grimler91 + +### IRC Development Channel + +- Purpose: Discussion about Termux development. Mirrored to Gitter + Development Channel +- Moderators: fornwall, glow(Neo-Oli), Grimler91 + +### Twitter + +- Link: +- Purpose: Twitter +- Administrators: fornwall + +### Facebook + +- Link: +- Purpose: Facebook +- Administrators: fornwall +- Moderators: Auxilus + +### F-Droid + +- Links: + + + + +- Purpose: Download Termux and Termux Addons + +### Google Play + +DEPRECIATED AND UNSUPPORTED + +- Link: +- Purpose: Download Termux +- Administrator: + [fornwall](https://play.google.com/store/apps/developer?id=Fredrik+Fornwall) + +### [Repositories](https://github.com/orgs/termux/repositories) + +#### termux-app + +- Link: +- Purpose: Main app repository + +#### termux-packages + +- Link: +- Purpose: Main package repository +- Upload (android-5): *discontinued after 01.01.2020* +- Upload (android-7): Termux maintainers + +#### termux-root-packages + +- Link: +- Purpose: Package repository for packages requiring root +- Upload: [Grimler91](https://github.com/Grimler91) + +#### game-packages + +- Link: +- Purpose: Package repository for games (or games-related) packages +- Upload: [Grimler91](https://github.com/Grimler91) + +#### science-packages + +- Link: +- Purpose: Package repository for science-related packages +- Upload: [Grimler91](https://github.com/Grimler91) + +#### x11-packages + +- Link: +- Purpose: Package repository for x11 related packages +- Upload (android-7 only): Termux maintainers + +# See Also + +- [Community](Community) \ No newline at end of file diff --git a/docs/en/Development_Environments.md b/docs/en/Development_Environments.md new file mode 100644 index 0000000000..8c92fe7890 --- /dev/null +++ b/docs/en/Development_Environments.md @@ -0,0 +1,297 @@ +Termux is often used for software development, information science +education and experimentation. Here are some articles and links with +information on how to make it possible with one of the following +programming environments. + +## APKs + +APKs (Android Package Kits) can be built in Termux on device with + + +## C/C++ + +Package: clang + +Description: C language frontend for LLVM + +Homepage: + +Related Issues: + + +## Common Lisp + +Package: ecl + +Description: ECL (Embeddable Common Lisp) interpreter + +Homepage: + +## D + +Package: ldc + +Description: D programming language compiler, built with LLVM + +Homepage: + +Instructions: + +## Dart + +Package: dart + +Homepage: + +## Elixir + +Package: elixir + +Description: Programming language compatible with the Erlang platform + +Homepage: + +## Erlang + +Package: erlang + +Description: Erlang programming language and runtime environment + +Homepage: + +## Forth + +Package: pforth + +Description: Portable Forth in C + +Homepage: + +## Go + +Package: golang + +Description: Go programming language compiler + +Homepage: + +Instructions: + +## Groovy + +Package: groovy + +Description: A multi-faceted language for the Java platform + +Homepage: + +## Haskell + +Package: ghc + +Description: Glasgow Haskell Compiler. + +ghc is currently disabled due to build issues. Looking for +patches that will fix package. + +Homepage: + +Related Issues: + + +## Java + +### ECJ + +Package: ecj + +Description: Eclipse Compiler for Java + +Homepage: + +Related Issues: + +### OpenJDK + +Package: openjdk-17 + +Description: Java development kit and runtime + +Related Issues: +, + + +## JavaScript + +See packages: quickjs, duktape, nodejs, nodejs-lts + +### NodeJS + +Homepage: + +## Kotlin + +Package: kotlin + +Homepage: + +## Lua + +Package: lua52 + +Package: lua53 + +Package: lua54 + +Description: Lightweight embeddable scripting language + +Homepage: + +## Nim + +Package: nim + +Description: Nim programming language compiler + +Homepage: + +## OCaml + +- [Compiling and setting up + OCaml](Compiling_and_setting_up_OCaml) (a copy of the + article ) + + + +Related Issues: + + +## Octave + +Octave is available from a community repository. Setup up +[its-pointless'](Package_Management#its-pointless_(live_the_dream)) +repository. + + + +## Perl + +Package: perl + +Homepage: + +## PHP + +Package: php + +Description: Server-side scripting language + +Homepage: + +Related Issues: + +## Picolisp + +- The original article: + +Related Issues: + + +## Prolog + +Package: swi-prolog + +Description: Popular prolog implementation + +Homepage: + +## Python + +Package: python + +Description: Python 3 interpreter + +Package: python2 + +Description: Python 2 interpreter + +Homepage: + +Related Issues: + + +## Racket + +Package: racket + +Homepage: + +## Ruby + +Package: ruby + +Homepage: + +Related Issues: + + +## Rust + +Package: rust + +Description: The Rust compiler and Cargo package manager + +Homepage: + +Related Issues: + + +## Scala + +Package: scala + +Homepage: + +## Scheme + +### TinyScheme + +Package: tinyscheme + +Description: Very small scheme implementation + +Homepage: + +### Guile + +Package: guile + +Homepage: + +## Smalltalk + +Package: smalltalk + +Description: Smalltalk-80 language implementation by GNU + +Homepage: + +## Swift + +Package: swift + +Description: Swift compiler + +Homepage: + +## Tcl + +Package: tcl + +Homepage: + +## See Also + +- [Development](Development) +- [Editors](Editors) +- [IDEs](IDEs) \ No newline at end of file diff --git a/docs/en/Differences_from_Linux.md b/docs/en/Differences_from_Linux.md new file mode 100644 index 0000000000..30937454b2 --- /dev/null +++ b/docs/en/Differences_from_Linux.md @@ -0,0 +1,106 @@ +The environment setup in Termux is similar to that of a modern Linux +distribution. However, running on Android implies several important +differences. + +## Termux is not FHS compliant + +*This is why Termux does not use official Debian or Ubuntu packages for +its environment.* + +Termux does not follow [Filesystem Hierarchy +Standard](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) +unlike majority of Linux distributions. You cannot find directories like +/bin, /etc, /usr, /tmp and others at the usual locations. Thus, all +programs must be patched and recompiled to meet requirements of the +Termux environment otherwise they will not be able to find their +configuration files or other data. + +You may have a problem executing scripts that have standard shebangs +(e.g. \#!/bin/sh). Use the `termux-fix-shebang` script to modify these +files before executing. Recent versions of Termux provide a special +package (termux-exec) which allows usage of standard she-bangs. + +Most packages have shared library dependencies which are installed to +\$PREFIX/lib. On devices before Android 7, Termux exports the special +variable \$LD_LIBRARY_PATH which tells the linker where to find shared +library files. On Android 7 or higher, the DT_RUNPATH ELF header +attribute is used instead of LD_LIBRARY_PATH. + +If you still need a classical Linux file system layout for some reason, +you may try to use **termux-chroot** from package 'proot': + +`$ pkg install proot` +`$ termux-chroot` +`$ ls /usr` +`bin  doc  etc  include lib  libexec  share  tmp  var` + +The **termux-chroot** utility may be very helpful if you use custom +software that requires standard paths like /tmp, /etc, /usr to be +available. + +## Termux uses Bionic libc + +![](images/Linux_executable_dynlinker_issue.png) + +To have the best compatibility with Android OS and to remove the need to +maintain custom toolchains we compile all our packages with the Android +NDK. The resulting binaries are linked against the Bionic libc (files +libc.so, libm.so, libdl.so from /system/lib or /system/lib64). + +Use of the libc provided by Android and FHS incompatibility make it +impossible to execute native packages copied from Linux distributions: + +- Dynamically linked programs will not run because the linker is + expected in a nonexistent location (/lib) and libc ABI does not match. +- Statically linked programs (only networking ones) will not be able to + resolve DNS names. GNU libc normally doesn't allow static linking with + resolver. Also, the file /etc/resolv.conf does not exist on Android. +- On non-rooted Android 8 or newer, statically linked programs will not + run due to issues with seccomp filter. +- See also: [Common porting + problems](https://github.com/termux/termux-packages/wiki/Common-porting-problems) + + +However, these restrictions can be bypassed by setting up a Linux +distribution rootfs with [PRoot](PRoot). + +## Root file system is stored as ordinary application data + +The root file system and user home directory are located in a private +application data directory which lives on the /data partition. Paths to +these directories are exposed as \$PREFIX and \$HOME respectively. + +You cannot move \$PREFIX to another location because all programs expect +that \$PREFIX will not be changed. Additionally, you cannot have +binaries, symlinks and other files from \$PREFIX on sdcard because that +file system does not support unix permissions, symlinks, sockets, etc... + +**Important**: if you uninstall the Termux application or wipe its data, +directories \$PREFIX and \$HOME will be wiped too. Before doing this, +make sure that all important data is backed up. + +## Termux is single-user + +Android applications are sandboxed and have their own Linux user id and +SELinux label. Termux is no exception and everything within Termux is +executed with the same user id as the Termux application itself. The +username may look like `u0_a231` and cannot be changed as it is derived +from the user id by Bionic libc. + +All our packages (except root-only ones) are patched to drop any +multiuser, setuid/setgid and other similar functionality. We also +changed default ports for server packages: ftpd, httpd and sshd have +their default ports set to 8021, 8080 and 8022 respectively. + +You have free read-write access to all application components including +\$PREFIX. Be careful since it is very easy to break things by +accidentally deleting or overwriting files in \$PREFIX. + +# See Also + +- [Running Linux operating systems in Termux PRoot](PRoot) +- [Sharing data between Termux and other + applications](Sharing_Data) +- [Termux-exec](Termux-exec) +- [Common porting + problems](https://github.com/termux/termux-packages/wiki/Common-porting-problems) \ No newline at end of file diff --git a/docs/en/Editors.md b/docs/en/Editors.md new file mode 100644 index 0000000000..68dcd9bde2 --- /dev/null +++ b/docs/en/Editors.md @@ -0,0 +1,26 @@ +[Audio Editors](Audio_Editors) : Audio editing software is software which allows editing and generating of audio data. Audio editing software can be implemented completely or partly as library, as computer application, as Web application or as a loadable kernel module. + + + +[Hex Editors](Hex_Editors) : A hex editor is a type of computer program that allows for manipulation of the fundamental binary data that constitutes a computer file. + + + +[Image Editors](Image_Editors) : Image editing encompasses the processes of altering images, whether they are digital photographs, traditional photochemical photographs, or illustrations. Traditional analog image editing is known as photo retouching, using tools such as an airbrush to modify photographs, or editing illustrations with any traditional art medium. Graphic software programs, which can be broadly grouped into vector graphics editors, raster graphics editors, and 3D modelers, are the primary tools with which a user may manipulate, enhance, and transform images. Many image editing programs are also used to render or create computer art from scratch such as [povray](https://github.com/termux/termux-packages/issues/202). + + + +[Stream Editors](Stream_Editors) : A Unix utility that parses and transforms text, using a simple, compact programming language. Options for doing stream editing include awk, node.js, perl and sed. + + + +[Text Editors](Text_Editors) : A system or program that allows a user to edit text. A text editor is a type of program used for editing plain text files. Text editors are provided with operating systems and software development packages, and can be used to change configuration files, documentation files and programming language source code. + + + +[Video Editors](Video_Editors) : With video editors various Video manipulation can be done, including: cutting, converting, splitting, joining ... + +# See Also + +- [IDEs](IDEs) +- [OCR](OCR) \ No newline at end of file diff --git a/docs/en/Emacs.md b/docs/en/Emacs.md new file mode 100644 index 0000000000..ee2082797c --- /dev/null +++ b/docs/en/Emacs.md @@ -0,0 +1,33 @@ +Package: emacs + +Description: An extensible, customizable, free/libre text editor — and +more. + +Homepage: + +![](images/Emacs.png) + +# ERC + +ERC is a powerful, modular, and extensible IRC client for Emacs. It is +distributed with Emacs since version 22.1. To use ERC type the following +in `emacs`: `M-x erc` +enter/return. `M-x` means `ALT+x` in Termux. Use +“irc.libera.chat” as the IRC server, “6697” as the port, choose a +nickname Just tap enter. Type `/join #termux` and presto, you can chat +on \#termux from emacs in your pocket. More at + + +![](images/ERCinTermux.png) + +# Newsticker + +- [Newsticker](Newsticker) provides a Feed Reader for Emacs. + +![](images/Newsticker.png) + +## See also + +- [ERC + Manual](https://www.gnu.org/software/emacs/manual/html_mono/erc.html) +- [IDE](IDE) +- [IRC](IRC) \ No newline at end of file diff --git a/docs/en/FAQ.md b/docs/en/FAQ.md new file mode 100644 index 0000000000..2c04ddb2e1 --- /dev/null +++ b/docs/en/FAQ.md @@ -0,0 +1,409 @@ +It is strongly suggested to start from these pages because FAQ does not +provide tips and tricks about Termux usage. + +- [User Interface](User_Interface) - description of available + buttons, menus, etc. +- [Package Management](Package_Management) - how to install, + remove and upgrade packages. +- [Touch Keyboard](Touch_Keyboard) - Touch keyboard shortcuts + and extra keys layout configuration. +- [PRoot](PRoot) - Running Linux distributions inside Termux + (userspace chroot mode) +- [Recover a broken + environment](Recover_a_broken_environment) - Fixing broken + Termux installations. +- [Special:AllPages](Special:AllPages) - List of the all + available Wiki pages. + + +You may contribute to Termux project by making pull requests in our +[Github repositories](https://github.com/termux) or by improving Termux +Wiki. + +## What is Termux + +Termux is a [terminal +emulator](https://en.wikipedia.org/wiki/Terminal_emulator) for Android +OS with its own package ecosystem. There are more than 1000 packages for +various purposes, including code editors, compilers, etc. + +## Is Termux an emulator + +Termux is an emulator and is not. It does not emulate any system; +Programs are executed natively. On the other hand, it is a terminal +emulator in the same way as many common Linux distribution programs are; +e.g., GNOME terminal, Konsole, Xterm and many more. + +[Terminal](https://en.wikipedia.org/wiki/Computer_terminal) is a +hardware device typically used before traditional desktop computers +appeared. + +[Terminal emulator](https://en.wikipedia.org/wiki/Terminal_emulator) is +a software that emulates a display (not CPU or whole system) with +capabilities of specific hardware terminal. + +## What are system requirements + +Android OS of version 7.0 as minimum. Be prepared that Termux uses much +of internal storage, you are dealing with packages ported from Linux +distributions. That's 500 MB - 5 GB typically, in some cases more... +Everything depends on your use cases. + +Also it is preferable to have AOSP Android, to avoid vendor-specific +quirks with process management and power-saving. + +## Will Termux work on Android 11 + +In short: yes, it works on Android 11 and 12 beta. + +Android security improvements in new versions often become a subject of +controversial discussions and recent \`execve()\` system call +restriction by SELinux configuration introduced with Android 10 was not +the exception. There lots of misinformation and conspiracy (aka "Google +want to kill Linux on Android") from people claiming themselves +"advanced users" about what is actually happening. + +Applications built with target SDK level 29 (means compatibility with +Android 10) will no longer be able to execute data files. All +executables must be packaged within the APK file. That's a reasonable +restriction. Application must not be able to modify itself. Updates and +new features must come within the APK of newer version. However there is +a problem: Termux is technically a bridge between Android application +and Linux environments. + +Fortunately, we chose to force use compatibility with Android 9 APIs +(SDK 28) at the cost of ability to publish updates on Google Play. That +is until we will workaround the issue. For now do not worry - it works +perfectly. + +Termux also supports Android 12 but running the app on this version of +Android would kill phantom processes and crash the app, meaning spawning +several processes would randomly close the application unintentionally. +if you plan to upgrade your device to Android 12, upgrade at your own +risk! + +Related issue: + +## Why does htop or netstat not work on my device + +In order to stop leaking sensitive information via side channels, +Android has blocked access to certain interfaces in /proc. This is done +for your privacy. + +Specifically: + +- /proc/net/\* +- /proc/loadavg +- /proc/stat +- /proc/uptime +- /proc/version +- /proc/vmstat +- And few others. + + +Restrictions vary between Android OS versions. Thus Android 7 is less +restrictive than 8/9/10+. You can use root to bypass them. + +Do not open issues in our repositories on this or complain how Google is +evil. We do not support such opinion or other Android-specific +conspiracy. + +## Why does ps not show Android processes + +Since Android 7, regular applications no longer can explore foreign +processes in /proc. This has been +[implemented](https://android.googlesource.com/platform/system/core/+/c39ba5a) +via hidepid=2 mount option. + +Termux can list only its own processes. You can see more only under +rooted shell or ADB. + +This restriction has weird effect on some programs. For example, some +processes like `ssh-agent` or `tor` daemons will no longer be visible +through `ps` and as result can't be terminated with `pkill ` or +`killall ` but only with `kill `. + +## Why my Termux is 32bit while CPU supports 64bit + +If Android OS reports support only of 32-bit ABIs, Termux will perform a +32-bit installation only. Its environment is not standalone and relies +on libraries provided by operating system. So if your system is 32-bit +only, you are out of luck. That is common issue with some device models +where manufacturer installed only 32-bit OS due to small system +partition. + +## Can Termux be installed on the external storage + +This can't be done, at least if your device is not rooted. + +Termux requires a native Linux file system such as +[EXT4](https://en.wikipedia.org/wiki/Ext4) or +[F2FS](https://en.wikipedia.org/wiki/F2FS) for supporting special files +like [symbolic links](https://en.wikipedia.org/wiki/Symbolic_link), +[sockets](https://en.wikipedia.org/wiki/Unix_domain_socket) and Unix +file attributes. Neither +[FAT32](https://en.wikipedia.org/wiki/File_Allocation_Table) or exFAT +supports them. Furthermore, Android applies a special overlay to any +general purpose file storage which turns underlying file system into +FAT32 or exFAT-like in order to solve certain issues and provide a +better experience for average user. + +If your device is rooted and you want to install Termux on external +storage, please refer to post on [Android Enthusiasts Stack +Exchange](https://android.stackexchange.com/questions/228443/can-the-termux-environment-be-put-on-an-external-sd-card). + +## Any tips for using Termux + +Here are the ones which should help you to survive in Termux shell: + +- Learn shell scripting! +- Always do `pkg upgrade`! +- Do backups, always! +- Do not execute things which you do not know! +- Carefully read everything that has been printed to terminal! + +## What do you use Termux for + +You can do everything, specifically what you are able to do with it. +That is the case where you are limited mostly by your skills. Of course, +OS and device hardware restriction matter too, but they are +insignificant. + +Here are just few ideas for Termux usage: + +- Device automation with scripting and Termux Tasker add-on. +- File transfer & synchronization via syncthing, rsync, rclone, etc. +- [SSH](https://en.wikipedia.org/wiki/SSH_(Secure_Shell)) client + (dropbear, openssh). +- Programming (clang, python, vim, etc). + +## Are there any Termux tutorials + +Please check page [Getting started](Getting_started). + +Note that while you can learn shell scripting with Termux, it is not the +best tool for this due to few [fundamental +differences](Differences_from_Linux) from the Linux +distributions. + +## What are advantages of root in Termux + +Root gains you control over system components. You will be able to +access freely all file systems, modify device firmware (ROM) as well as +perform fine tuning of kernel configuration, networking, etc. + +Certain tools like cryptsetup, mount, nmap (advanced scan modes), +tcpdump require root access. + +## What is a fake root + +Fake root means exactly "fake root", i.e., not real root. It does not +provide any real superuser privileges. It just changes user ID and label +to assist in certain tasks. + +There 2 ways to get a fake root: + +- Package \`fakeroot\` - useful solely for packagers who need to create + archives with files having certain ownership and permissions. Of + course, using the real root in this case is overkill. +- Package \`proot\` - run a rootless Linux distribution "chroot". + + +Fake root will not help you to root your device. Neither will help you +to run a software requiring superuser privileges. + +## Can I hack a social media with Termux + +As some people say, there nothing impossible in the world, and that's +true in case of Termux and specifically this question. However we do not +provide any help on it - you are on your own. + +Hacking and phishing topics are discouraged within all official Termux +communities. + +## Where are Metasploit and Hydra packages + +Packages Hashcat, Hydra, Metasploit and Sqlmap have been removed from +Termux repositories. We do not accept requests of hacking packages and +neither provide help for using or installing them. + +## Why app from F-Droid cannot be installed + +Open your Android settings --\> Applications and check whether you have +applications containing the word "Termux" in their name. If so, +uninstall all of them: Termux, Termux:API, Termux:Styling, +Termux:Widget, Termux:Boot and others. And yes, paid add-dons should be +uninstalled too. + +After that you should be able to install Termux app from F-Droid. + +## Why Termux add-ons on Google Play are paid even though their sources are on GitHub + +This has been made as kind of donation. If you do not want to donate, +use application and add-ons from F-Droid or custom builds from sources. + +Remember that open-source or free software does not mean that software +cannot be paid. This is not forbidden by licenses of our source code. +Also "free" means "freedom", in context of GNU GPL which even explicitly +states that free software can be paid as soon as sources are freely +available. + +## How can I keep my data when reinstalling Termux + +You need to archive contents of these directories: + +`/data/data/com.termux/files/usr` +`/data/data/com.termux/files/home` + +You can use utility `tar`. Before uninstalling the app, ensure that +archives are placed to safe location such as `/sdcard`. + +## Repositories are down and return 403 404 errors + +Switch to a working repository with \`termux-change-repo\`. You will +need to select repositories which do not work, if unsure what to +select - select everything. + + + +## How to open failsafe shell + +There are 2 variants how to do that: 1. Open drawer by swiping +rightwards -\> long tap on "new session" -\> tap "failsafe". 2. Close +Termux app -\> long tap on icon -\> tap "failsafe". + +See [Recover a broken +environment](Recover_a_broken_environment) for more +information on Termux recovery topic. + +## How can I access device storage with Termux + +You need to grant a *Storage access permission* to application. We +recommend to do that through command + +`termux-setup-storage` + +It will ask for permission and once it was granted, it will setup a +symlinks in directory \~/storage to standard directories like DCIM, +Download, etc. + +Storage (shared) is usually accessible through: + +- /storage/emulated/0 +- /storage/self/primary +- \$HOME/storage/shared + + +External storage is restricted by Android OS. You can read files but +cannot write them, except ones located in Termux private directory +accessible through `$HOME/storage/external-1`. Termux cannot have write +access to external storage like file manager applications do. + +If you are on Android 11 and storage suddenly has become inaccessible, +then revoke permission from Android settings and grant again. + +## How can I hide the extra keys + +Tap key combination *Volume Up + K*. + +Alternate approach is to open drawer via swiping rightwards from the +left screen side and then long tap on "Keyboard" button. + +## Why text appears only after hitting space + +This is a keyboard-specific known issue. It happens because keyboard has +not internally reset input method type and tries to use unsupported +features like auto-correction or prediction. + +In order to solve issue you need to use either a different keyboard or +run these commands: + +`mkdir -p ~/.termux` +`echo "enforce-char-based-input = true" >> ~/.termux/termux.properties` + +Restart application after making changes to "termux.properties" file. + +## How do I get help for a specific package + +Usually you can use next commands to get a brief usage of the utility: + +`packagename -h` +`packagename --help` + +More advanced information can be viewed by using a `man` tool. It can be +[installed](Package_Management) by + +`pkg install man` + +Here is an example how to view information for utility `ls`: + +`man ls` + +Tips, when reading a man page: + +- Use q to quit +- Use space for next page +- /search for search +- n for repeat search + + +Sometimes utility name may not match the package name. If you +encountered a such package, consult its online home page to get a brief +introduction or use utility `apt-file` to list the available files +including utilities and documentation. + +## Why does a compiled program show warnings + +Warnings produced by dynamic linker about unused sections are safe. They +just notify developer that ELF header of executable file has extra +information which cannot be interpreted by current linker version. In +case of DT_FLAGS_1=0x8, it warns about RTLD_NODELETE ELF section. +Besides DT_FLAGS_1=0x8, there more types of ELF sections which are not +handled by Android linker. + +To make this warning disappear you need to use utility +"termux-elf-cleaner" binary file and probably on all its dependencies. + +`pkg install termux-elf-cleaner` +`termux-elf-cleaner ./myprogram` +`termux-elf-cleaner ./libmysharedlibrary.so` + +Number of supported ELF sections increases with each Android OS version. +On Android \>7.0 you may not get such warnings. + +## Can I use Termux packages in my own project + +Yes, as Termux is open-source and uses a GNU GPL v3.0 and in some +components Apache-2.0 license, you can freely re-use existing components +as soon as you met the license requirements. + +However license does not cover "free" use of our hosting capabilities +which are somewhat limited. You cannot use our package repositories in +your own project(s). Please build packages and host them yourself. + +Get started with information on developer's wiki pages: +. + +## How to run Termux commands from other application + +Termux provides optional interface for processing command execution +requests made by third-party applications. + +Detailed information with examples is available at +. + +## Can Termux run some commands automatically right after installation + +No, this feature has not been implemented. Unconditional automated +execution of arbitrary commands (script on shared storage) also implies +a security issue. + +Worth to note that Termux does not have storage access by default and we +have not re-considered this behavior. + +Related pull request: + +# See Also + +- [Community](Community) +- [Development](Development) \ No newline at end of file diff --git a/docs/en/FISH.md b/docs/en/FISH.md new file mode 100644 index 0000000000..d01ca1ca92 --- /dev/null +++ b/docs/en/FISH.md @@ -0,0 +1,66 @@ +FISH is a smart and user-friendly command line shell for macOS, Linux, +and the rest of the family. +The FISH shell init files are `~/.fish`, `$PREFIX/etc/fish/config.fish` +and more. See \`man fish\` and \`info fish\` for more information. + +## Oh-My-Fish + +Oh-my-fish of fish shell working without any known issue in termux, you +can install it with official manual in the repository +[here](https://github.com/oh-my-fish/oh-my-fish/blob/master/README.md). +Run `$ omf` to get some help installing plugin and theme. + +## Fisherman + +Fisherman is a fish-shell plugin manager. + +### Installation + +`curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs `[`https://git.io/fisher`](https://git.io/fisher) + +### Usage + +Install a plugin. `fisher z` + +Install several plugins concurrently. +`fisher fzf edc/bass omf/thefuck omf/theme-bobthefish` + +Install a specific branch. `fisher edc/bass:master` + +Install a specific tag. `fisher edc/bass@1.2.0` + +Install a gist. +`fisher `[`https://gist.github.com/username/1f40e1c6e0551b2666b2`](https://gist.github.com/username/1f40e1c6e0551b2666b2) + +Install a local plugin. `fisher ~/path/to/my_plugin` Edit your fishfile +and run fisher to commit changes, e.g. install missing plugins. +`$EDITOR ~/.config/fish/fishfile fisher` + +Show everything you've installed. fisher ls @ my_plugin \# a local +plugin + +- bobthefish \# current theme + +` bass` +` fzf` +` thefuck` +` z` + +Show everything available to install. `fisher ls-remote` + +Show additional information about plugins: +`fisher ls-remote --format="%name(%stars): %info [%url]\n"` + +Update everything. `fisher up` + +Update specific plugins. `fisher up bass z fzf` + +Remove plugins. `fisher rm thefuck` + +Remove all the plugins. `fisher ls | fisher rm` + +Get help. `fisher help z` + +Homepage: + +Source code: \ No newline at end of file diff --git a/docs/en/Fail-safe.md b/docs/en/Fail-safe.md new file mode 100644 index 0000000000..77e166e01a --- /dev/null +++ b/docs/en/Fail-safe.md @@ -0,0 +1,2 @@ +1. REDIRECT [Recover a broken + environment](Recover_a_broken_environment) \ No newline at end of file diff --git a/docs/en/Getting_started.md b/docs/en/Getting_started.md new file mode 100644 index 0000000000..7d3e1aab0c --- /dev/null +++ b/docs/en/Getting_started.md @@ -0,0 +1,172 @@ +Termux is a terminal emulator application enhanced with a large set of +command line utilities ported to Android OS. The main goal is to bring +the Linux command line experience to users of mobile devices with no +rooting or other special setup required. + +# How does it work + +The terminal emulator is basically an application that launches the +command line program by using system call +[execve(2)](https://www.man7.org/linux/man-pages/man2/execve.2.html) and +redirecting standard input, output and error streams onto the display. + +Most terminal applications available on Android OS work with a very +limited set of utilities which are usually provided either by the +operating system or other rooting tools such as Magisk. We have decided +to go further and port common software usually available on GNU/Linux +systems to Android OS. + +Termux is neither a virtual machine nor any other kind of emulated or +simulated environment. All provided packages are cross-compiled with +Android NDK and only have compatibility patches to get them working on +Android. The operating system does not provide full access to its file +systems, so Termux cannot install package files into standard +directories such as /bin, /etc, /usr or /var. Instead, all files are +installed into the private application directory located at + +`/data/data/com.termux/files/usr` + +We call that directory "prefix" and usually refer to it as "\$PREFIX", +which is also an exported environment variable in the Termux shell. Note +that this directory cannot be changed or moved to an SD-Card because: + +- The file system must have support for unix permissions and special + files such as symlinks or sockets. +- The prefix path is hardcoded into all binaries. + +In addition to prefix, users can store files in the home directory (or +"\$HOME") available at + +`/data/data/com.termux/files/home` + +However, the file system is not the only difference from the traditional +Linux distributions. For more information, read [Differences from +Linux](Differences_from_Linux). + +# What can I do with Termux? + +There are a number of common use-cases for the Termux application: + +- Data processing with Python. +- Programming in a development environment. +- Downloading and managing files and pages using time-established tools. +- Learning the basics of the Linux command line environment. +- Running an SSH client. +- Synchronizing and backing up your files. + + +Of course, usage is not limited to the topics listed above. There are +more than 1000 packages in our repositories. If these packages don't +have what you're looking for, you can compile your own - we have a +variety of build tools, including compilers for languages like C, C++, +Go, Rust. Interpreters for common languages like NodeJS, Python, Ruby +are available too. + +Please note that Termux is not a rooting tool and will not give you root +privileges unless you are skilled enough to break the Android OS +security. + +# Is root required + +Normally Termux does not require device to be rooted. In fact it's +primarily targeted for non-root users. + +You may want to root your device to: + +- Modify a device's firmware. +- Manipulate the parameters of the operating system or kernel. +- Non-interactively install/uninstall APKs. +- Have full R/W access to all file systems on device. +- Have direct access to hardware devices such as BT/Wi-Fi modules or + serial lines (e.g. to access modem). +- Install a Linux distribution on top of Android through chroot (not + proot!) or containerization. +- Generally have "full" control over your device. + + +Otherwise root isn't necessary and is rather bad than good. + +# Tips + +Here are basic tips on how to use Termux and survive: + +- Learn shell scripting! +- Always keep your packages up-to-date! Run command `pkg upgrade` on + regular basis or at least before installing a new package. Not + updating packages or downgrading them voids your warranty. +- Do backups, always! Without backups, you will be probably unable to + roll back if something goes wrong. Please note that software + developers should pay attention to backing up debfiles of used + compilers, interpreters or dependencies because Termux does not + provide older package versions and it is a rolling-release. Check + [Backing up Termux](https://wiki.termux.com/wiki/Backing_up_Termux) + for info on how to backup and restore. +- Do not execute things which you do not know! Review scripts downloaded + from the Internet. Always think about what you are typing into the + terminal. +- Carefully read everything that has been printed to the terminal! + Understanding the informational messages helps resolving issues which + may occur. + +# Are there any tutorials + +We are not capable of maintaining the whole documentation about Linux +commands, shell scripting and other general-purpose information so links +to external resources are provided instead. + +**We strongly suggest that you avoid YouTube tutorials, especially +related to hacking.** There a lot of clickbait targeted at inexperienced +users. If you decide to follow them, ensure that you fully understand +the executed commands. Also always check the content of downloaded +files. If the content of downloaded scripts is obfuscated, that should +be an alarm about potentially unsafe content. Do not complain that +Termux has not fulfilled your expectations. + +## Commands and Shell Scripting + +Discover the commands and learn how to use shell effectively. + +- +- +- + + +These links may be useful for advanced users: + +- reference with examples of Bash + built-in commands use, +- The Debian Administrator's Handbook. + + +*When following tutorial examples, remember that Termux is not a Linux +distribution.* Some commands may not work, for example `ls /home`, due +to non-existent paths and other +[differences](Differences_from_Linux) Linux and Android have +regarding Termux distributions. + +# How can I contribute? + +The best ways to contribute are: + +- Improving the Termux Wiki pages, i.e. by fleshing out sections that + could use additional information or by correcting errors in grammar. +- Submitting bug reports. Please only submit reports that are about + Termux packages or applications. Other errors should be submitted + elsewhere. +- Submitting package updates. +- Submitting pull requests with bug fixes and improvements. + + +All of the source code for Termux can be found at +. + +# See also + +- [FAQ](FAQ) +- [Development Environments](Development_Environments) +- [Editors](Editors) +- [Differences from Linux](Differences_from_Linux) +- [Package Management](Package_Management) +- [Recover a broken + environment](Recover_a_broken_environment) +- [Software](Software) \ No newline at end of file diff --git a/docs/en/Graphical_Environment.md b/docs/en/Graphical_Environment.md new file mode 100644 index 0000000000..e607834d69 --- /dev/null +++ b/docs/en/Graphical_Environment.md @@ -0,0 +1,259 @@ +**This article is only applicable only to Termux installations running +on Android 7.0 or higher.** + +Termux provides support for programs that use X Window System. However, +there no hardware acceleration for rendering and user will have to +install a third party application to view graphical output. + +![](images/MtPaint_Fluxbox_vncviewer.jpg) To +use X11-enabled programs, please, make sure that at least one of the +following programs is installed: + +- [VNC + Viewer](https://play.google.com/store/apps/details?id=com.realvnc.viewer.android) - + the best choice for interacting with graphical environment. Requires a + running VNC server. + + + +- [XServer + XSDL](https://play.google.com/store/apps/details?id=x.org.server) - + this one may be unstable but it provides a standalone Xorg server so + you don't have to setup VNC. + + + +- [Android XServer](https://github.com/nwrkbiz/android-xserver) - Only + implements the core X11 protocol. Shares clipboard between android / + X11 and includes a window manager. + +## Enabling the X11 Repository + +X11 packages are available in a **separate** APT repository. You can +enable it by running the following command: + +`pkg install x11-repo` + +It will automatically add appropriate sources.list file and PGP key. + +To disable this repository, you need to uninstall package `x11-repo`. + +## Setting up VNC + +### Server + +If you decided to use VNC for graphical output, follow these +instructions for properly setting up VNC server. + +1\. Install package \`tigervnc\`: + +`pkg install tigervnc` + +2\. After installation, execute this: + +`vncserver -localhost` + +At first time, you will be prompted for setting up passwords: + + You will require a password to access your desktops. + + Password: + Verify: + Would you like to enter a view-only password (y/n)? n + +Note that passwords are not visible when you are typing them and maximal +password length is 8 characters. + +3\. If everything is okay, you will see this message: + + New 'localhost:1 ()' desktop is localhost:1 + + Creating default startup script /data/data/com.termux/files/home/.vnc/xstartup + Creating default config /data/data/com.termux/files/home/.vnc/config + Starting applications specified in /data/data/com.termux/files/home/.vnc/xstartup + Log file is /data/data/com.termux/files/home/.vnc/localhost:1.log + +It means that X (vnc) server is available on display 'localhost:1'. + +4\. Finally, to make programs do graphical output to the display +'localhost:1', set environment variable like shown here (yes, without +specifying 'localhost'): + +`export DISPLAY=":1"` + +You may even put this variable to your bashrc or profile so you don't +have to always set it manually unless display address will be changed. + +### Client + +Here will be assumed that you use this Android VNC client: [VNC +Viewer](https://play.google.com/store/apps/details?id=com.realvnc.viewer.android) +(developed by RealVNC Limited). + +![](images/Vncviewer_conn_info01.jpg) 1. Determine +port number on which VNC server listens. It can be calculated like this: +`5900 + {display number}`. So for display 'localhost:1' the port will be +5901. + +2\. Now open the VNC Viewer application and create a new connection with +the following information (assuming that VNC port is 5901): + + Address: + 127.0.0.1:5901 + + Name: + Termux + +- If you are using VNC client on a computer using the same network as + the phone does, make sure you correctly start a VNC session and know + the IP address of the device. + +3\. Now launch it. You will be prompted for password that you entered on +first launch of 'vncserver'. Depending on packages you installed, you +may see either entirely black screen or terminal prompt (only if 'aterm' +is installed). + +## Setting up XServer + +Xserver setup is nearly same as for VNC. The only differences are that +you don't have to configure authentication and variable "DISPLAY" should +be set like + +`export DISPLAY=localhost:0` + +Note that you don't need to set variable "PULSE_SERVER" like application +suggests because Termux uses its own Pulseaudio package. + +## Window Managers + +When using Android XServer rather than Android XSDL these are optional. + +### Fluxbox + +![](images/Fluxbox_aterm_lynx.png) + +Simplest way to get a working graphical environment is to install +Fluxbox: + +`pkg install fluxbox` + +It can be started automatically on VNC server startup. To do this, edit +file `~/.vnc/xstartup` as shown here: + +``` bash +#!/data/data/com.termux/files/usr/bin/sh +## Fluxbox desktop. + +# Generate menu. +fluxbox-generate_menu + +# Start fluxbox. +fluxbox & +``` + +### Openbox + +![](images/Openbox_aterm_geany.png) + +Openbox requires a more complicated configuration than Fluxbox. Firstly +you need to install some packages: + +`pkg install openbox pypanel xorg-xsetroot` + +Put the following lines to your `~/.vnc/xstartup`: + +``` bash +#!/data/data/com.termux/files/usr/bin/sh + +# Start Openbox. +openbox-session & +``` + +Don't put anything else to file `~/.vnc/xstartup` but only lines shown +above since Openbox has own autostart script. It is located at +`${PREFIX}/etc/xdg/openbox/autostart` (or alternatively at +`~/.config/openbox/autostart`). Edit this file like here: + +``` bash +# Make background gray. +xsetroot -solid gray + +# Launch PyPanel. +pypanel & +``` + +## Desktop environment + +It is possible to setup a full blown desktop environment in Termux. Only +XFCE, LXQt and MATE is supported. + +### XFCE + +![](images/Termux_XFCE.png) + +Recommended way of installation is through metapackage and not the +separate components: + +`pkg install xfce4` + +VNC server startup configuration (`~/.vnc/xstartup`) should contain only + +``` bash +#!/data/data/com.termux/files/usr/bin/sh +xfce4-session & +``` + +Additional recommended packages for installation: + +- `netsurf` - Simple graphical web browser. Javascript is not supported. +- `xfce4-terminal` - Terminal emulator for XFCE. It is not included as + part of XFCE installation to allow use of `aterm` or `st`. + +### LXQt + +Recommended way of installation is through metapackage and not the +separate components: + +`pkg install lxqt` + +VNC server startup configuration (`~/.vnc/xstartup`) should contain only + +``` bash +#!/data/data/com.termux/files/usr/bin/sh +lxqt-session & +``` + +Additional recommended packages for installation: + +- `otter-browser` - Free and open source web browser that aims to + recreate aspects of Opera 12.x +- `qterminal` - Terminal emulator for LXQt. It is not included as part + of LXQt installation to allow use of `aterm` or `st`. + +### MATE + +As of right now, there is no MATE metapackage. So, you need to install +all required MATE components serperately + +`pkg install mate-* marco` + +VNC server startup configuration (`~/.vnc/xstartup`) should contain only + +``` bash +#!/data/data/com.termux/files/usr/bin/sh +mate-session & +``` + +Additional recommended packages for installation: + +- `netsurf` - Simple graphical web browser. Javascript is not supported. +- `mate-terminal` - Terminal emulator for MATE. It is not included as + part of MATE installation to allow use of `aterm` or `st`. + +## Notes + +\- Currently hardware acceleration is not supported by default. + +## See also + +- [Sources for X11 packages](https://github.com/termux/x11-packages) \ No newline at end of file diff --git a/docs/en/Hacking.md b/docs/en/Hacking.md new file mode 100644 index 0000000000..f75f06452f --- /dev/null +++ b/docs/en/Hacking.md @@ -0,0 +1,250 @@ +On various Internet resources, Termux is recognized as utility +extremelly helpful for variety of purposes like hacking, phishing and +information gathering. This is possible due to availability of famous +pentesting software like [Metasploit +Framework](https://www.metasploit.com/), +[SQLMAP](https://github.com/sqlmapproject/sqlmap), +[Aircrack-NG](https://www.aircrack-ng.org/), [Nmap](https://nmap.org/) +and many others. Best experience could be achieved by using a rooted +device and [NetHunter](https://www.kali.org/docs/nethunter/) modified +kernel +([Base](https://www.kali.org/docs/nethunter/nethunter-kernel-2-config-1/), +[Net](https://www.kali.org/docs/nethunter/nethunter-kernel-3-config-2/), +[SDR](https://www.kali.org/docs/nethunter/nethunter-kernel-5-config-4/), +[USB](https://www.kali.org/docs/nethunter/nethunter-kernel-6-config-5/), +[Wi-Fi](https://www.kali.org/docs/nethunter/nethunter-kernel-4-config-3/)). + +## Why Termux discourages hacking + +*Spoiler: that is not about legit use of Termux for authorized +pentesting by security specialists, but rather about community activity +discrediting our project.* + +![](images/Termux-is-not-for-hacking.png) + +Termux has been created as general-purpose tool suitable for wide range +of use cases. People often use it for task automation via shell +scripting, SSH client, file synchronization and backup, running pocket +web server or development environment. Hacking is just only one of many +possible usage variants. + +Unfortunately, the Internet is full of examples of the worst possible +Termux usages targeted on people excessively interested in privacy +violation, fraud, spying or stalking. Many of them are confusing and it +is quite hard to reproduce, especially people who are new to command +line software and scripting. We often getting requests for help on these +topics:![](images/Skids-are-messaging-us.png) + +- How to hack Wi-Fi? +- How to hack Facebook? +- How to view private photos of specific Instagram account? +- How to track someone knowing phone number or IP address? +- How to create a web site clone for phishing? +- How to spam with SMS? Which SMS bomber is the best? +- How to install and use Kali Linux? + + +Obviously, this has nothing to do with legit penetration testing but +correlate with Termux-related information spread on social media. This +just gives no chance to be discover other use cases. Mature communities +of Linux enthusiasts often recognize our project as "script kiddie" +sandbox, rather than a serious project aiming to bring common free and +open source software to Android OS ecosystem. Not saying that this fact +makes troublesome to find qualified contributors to keep the project up. + +Now, we have chosen to not participate in this nonsense. We do not +provide hacking tools in our repositories anymore - don't even ask for +them. Several common tools were removed, i.e. Metasploit, Hashcat, +Hydra, SQLMAP. Additionally, we have banned these topics in our +[community social media](Community): Hacking, Phishing, +Spying (including OSINT), Spamming and others describing activity +deliberately violating other person's privacy or is destructive. + +## Terminology + +**Script kiddie**: a person with poor knowledge in computer systems and +programming, who tries to use pentesting software for impressing friends +or gaining authority in computer enthusiast communities. Script kiddes +are known to often reject educational resources and other kind of help +on improving their skills, especially if learning path takes much time. +They need everything and now, claiming themselves as "newbies". + +**Hacker**: a computer expert who uses their technical knowledge to +achieve a goal or overcome an obstacle, within a computerized system by +non-standard means - often referred as "power" or "advanced" users. +Hackers are not necessarily persons who uses their skills to breach +computer system security. + +**Hacking**: exploiting weaknesses in computer systems or networks in +order to bypass defenses, gain unauthorized access to data or use +undocumented features and functionality. + +**Ethical Hacking**: also known as "Penetration Testing" - a simulated +authorized cyber attack on computer units for evaluating the security +level of given system. All uncovered security issues are reported to the +owner of targeted system. + +**White Hat**: a person that does ethical hacking, i.e. attacks system +with owner permission and helps to get rid of discovered security +issues. + +**Black Hat**: a person that attacks the computer system without +permission with motive of destruction or personal profit. + +**Phishing**: a type of fraudulent activity involving the psychological +manipulation of people to reveal confidential information. Since +phishing exploits the human nature instead of computer system +weaknesses, it cannot be considered as hacking and moreover, it is never +ethical. + +**Exploit**: a fragment of data that is used to take advantage of a +software or hardware bug to cause unintended or unanticipated behavior +of computer system, leading to denial of service or attacker's privilege +escalation (e.g. gaining root permissions). + +**DoS attack**: an attack causing denial of service through exhausting +computing resources (e.g. network throughput), exploiting software bug +causing abnormal CPU or memory usage or leading to crash of server +software. + +**DDoS attack**: a denial-of-service attack performed by multiple +actors, usually by thousands of infected computer systems. + +**Spamming**: sending unsolicited content to messaging systems and +social media for the purpose of commercial advertisement, phishing, etc. +Spam has nothing to do with hacking, but it doesn't mean that it is +acceptable activity. + +**SMS bombing**: a destructive variant of spam, involving continuous +sending of large amount of SMS messages in a short time. + +**Phone call bombing**: same as SMS bombing but with phone calls. Under +certain cases it can be even considered rather as DoS attack than just +spam. + +**Brute force**: a way to guess the password by trying every possible +combination of characters, numbers and special symbols. Under perfect +conditions and without time constraints, this attack is almost always +successful. In reality, it is the most expensive way of gaining +unauthorized access as require trade off between consumed computing +resources (energy) and time. + +**Root**: also known as Superuser - a special user account that has all +permissions and thus having full control over operating system. On +modern Linux-based systems its privileges are defined through +[capabilities](https://man7.org/linux/man-pages/man7/capabilities.7.html), +which can be revoked or selectively granted to non-root users. More +fine-grained root user permissions control can be achieved through +implementing mandatory access control policies, e.g. via SELinux. + +**Rooting**: an activity aiming to gain root privileges on the device. +Can involve exploiting vulnerabilities in operating system, but often +this is done in a "legal" way through installing a custom firmware. + +**Custom kernel**: an operating system kernel with extra features +besides bare minimum functionality. As Android typically uses a very +minimal Linux kernel build, in order to add support for custom hardware +you will need to compile your own. + +**Monitor mode**: also known as RFMON (Radio Frequency MONitor) - a +functionality of wireless network interface adapter allowing to capture +radio frames. It is known to be either disabled or not implemented at +firmware level for the Wi-Fi adapters built into Android devices. + +## How to be a hacker + +Just using Kali Linux, especially in a chroot (proot) variants, will not +make you become a hacker automatically. This requires huge amount of +skills, which is not possible to acquire in a few days or weeks. This +takes years. If you are interested in how your roadmap will look like, +check this page: . + +Once you think you are good enough for practice, here is a service for +proving your skills: + +By stepping on hacker's road, especially if decided to use Termux for +hacking purposes, you agree that you are on your own. Warranty is lost +at this point. We will not assist you in fixing issues, whether or not +related to your activity. If certain tools do not work or in any other +way malfunctioning, report issues to their distributors or original +authors. + +Remember that Termux staff and community are not responsible for all +your hacking troubles, lost data, broken devices and other damage caused +by your usage of Termux. + +## How to use Termux safely + +Just follow these principles: + +- When following a tutorial, make sure that you properly understand the + goal and every instruction. Understand what commands you are typing + and what they do. +- Use root permissions only when necessary. Never run everything, + including current shell, as root. +- Install software only from trusted sources. Remember that even open + source software can contain trojan functionality. +- If third-party script asks for credentials, most likely it is a scam. + Obfuscated third-party scripts are likely to be a scam too. +- Suspicious files should be sent to + [VirusTotal](https://www.virustotal.com/gui/home/upload). +- Do backups regularly, preferably encrypted and stored on at least 2 + hardware disks (HDD, in worst case USB flash stick) and 1 copy on + cloud. +- Don't think you are very careful and thus bulletproof for scam, + phishing or trojans. Long random passwords, verified software and + brain in head are nice, but being prepared to be pwned at some day is + even better. +- Remember that YouTube tutorials are made for profit and entertainment, + but not suitable for education. + +## Package requests + +**We do not accept any requests for hacking packages.** Please do not +submit them because such requests will be deleted. + +If you are interested in maintaining a repository of pentesting or +phishing packages, please do it on your own. We encourage community to +create own repositories with custom content rather than solely relying +on us and our services. Hacking package repositories are not eligible to +become "official" anyway. + +## External resources + +- [Top 10 Web Application Security + Risks](https://owasp.org/www-project-top-ten/) +- [Hack The Box - pentester's playground](https://www.hackthebox.eu/) +- [Courses by Offensive + Security](https://www.offensive-security.com/courses-and-certifications/) + +## Tags + +0day, abuse, account, adminfinder, aircrack-ng, aireplay-ng, airgeddon, +airodump-ng, andrax, androspy, anonymous, apt2, arp poisoning, b11, b3x, +b4bomber, backdoor, badmod, beef, black-hydra, blazy, bluespy, bomber, +brutal, brute, bruteforce, brutex, bully, burp suite, call, catphish, +cloner, combogen, combos, cowpatty, crack, cracking, credmap, cyberscan, +d00r, dark-fb, darkfly, ddos, decompile, deface, demozz, devploit, +disassemble, discord, dmitry, dsniff, eagleeye, easy_hack, eggshell, +email, evilginx, exploit, exploitdb, eyewitness, facebook, faraday, +findsploit, firefly, flood, followers, free, fsociety, genvirus, gmail, +goldeneye, grabber, h4ck, hack, hacker, hacklock, hakkuframework, +hashcat, hemera, hidden eye, i2p, infect, infoga, insta-bf, instagram, +instahack, intercept, ipdrone, ip-tracer, johntheripper, kali linux, +kalimux, katanaframework, kismet, krack, lazybee, lazymux, lazysqlmap, +lazy-termux, lucifer, maltego, malware, maskphish, masscan, mbomb, mdk3, +mdk4, metasploit, meterpreter, mitm, mitmproxy, morpheus, mrphish, msf, +netattack, nethunter, netscan, nexphisher, nikto, nmap, nmbf, onex, +osif, osint, oxidtools, parrot os, password, paybag, payload, +pentesting, phishing, phoneinfoga, ping, powersploit, pwn, pyrit, +rainbow tables, rang3r, rat, ravana, reaver, recovery, red hawk, root, +routersploit, rpcscan, saycheese, setoolkit, shellcode, shellnoob, +shodan, skipfish, slowloris, sms, sms bomber, sn1per, socialbox, +socialfish, spam, spammer, spazsms, spy, sql injection, sqlmap, +sqlninja, sslstrip, striker, tbomb, telegram, th3inspector, thc-hydra, +thc-ipv6, thebond, the-eye, thefatrat, theharvester, tool-x, tor, +trojan, udp flood, umbrella, virus, vpn, vulnerability, vulnscan, +vulscan, webscarab, websploit, webspoilt, weeman, wep, whatsapp, wi-fi, +wifi, wifibrutecrack, wifigod, wifi-hacker, wifiphisher, wifitap wifite, +wirespy, wordlist, wpa2, wpa3, wps, wpscan, xerxes, xss, xsser, +xsstrike, youtube, zirikatu, zphisher. \ No newline at end of file diff --git a/docs/en/Hardware.md b/docs/en/Hardware.md new file mode 100644 index 0000000000..40f3eecb03 --- /dev/null +++ b/docs/en/Hardware.md @@ -0,0 +1,7 @@ +[Hardware Keyboard](Hardware_Keyboard): How to control Termux with a hardware keyboard +[Hardware Mouse](Hardware_Mouse) : How to control Termux with a hardware mouse +[Internal and External Storage](Internal_and_external_storage): Accessing Files in shared storage and on SD Card + +# See Also + +- [OTG](OTG) \ No newline at end of file diff --git a/docs/en/Hardware_Keyboard.md b/docs/en/Hardware_Keyboard.md new file mode 100644 index 0000000000..3b516da7cc --- /dev/null +++ b/docs/en/Hardware_Keyboard.md @@ -0,0 +1,21 @@ +The following shortcuts are available when using Termux with a hardware +(e.g. bluetooth) keyboard by combining them with Ctrl+Alt: + +- ‘C’ → Create new session +- ‘R’ → Rename current session +- Down arrow (or ‘N’) → Next session +- Up arrow (or ‘P’) → Previous session +- Right arrow → Open drawer +- Left arrow → Close drawer +- ‘M’ → Show menu +- ‘U’ → Select URL +- ‘V’ → Paste +- +/- → Adjust text size +- 1-9 → Go to numbered session +- ‘K’ → Enable/Disable soft keyboard + +# See Also + +- [Hardware Mouse](Hardware_Mouse) +- [OTG](OTG) +- [Touch Keyboard](Touch_Keyboard) \ No newline at end of file diff --git a/docs/en/Hardware_Mouse.md b/docs/en/Hardware_Mouse.md new file mode 100644 index 0000000000..ac12e3b668 --- /dev/null +++ b/docs/en/Hardware_Mouse.md @@ -0,0 +1,9 @@ +You can almost do anything you can do with a hardware mouse on the +touchscreen, i.e. a virtual mouse. + +# See Also + +- [Screen Gestures](Screen_Gestures) +- [Hardware Keyboard](Hardware_Keyboard) +- [OTG](OTG) +- [Touch Keyboard](Touch_Keyboard) \ No newline at end of file diff --git a/docs/en/Hex_Editors.md b/docs/en/Hex_Editors.md new file mode 100644 index 0000000000..1df2c64ff8 --- /dev/null +++ b/docs/en/Hex_Editors.md @@ -0,0 +1,24 @@ +A hex editor is a type of computer program that allows for manipulation +of the fundamental binary data that constitutes a computer file. + + +is about `hexdump`, `od` and `xxd`. See `man hexdump`, `man od` and +`man xxd` for more info... + +## hexcurse + +Use `pkg install hexcurse` to install a console hex editor. + +Homepage: + +## ired + +Use `pkg install ired` to install a minimalist hexadecimal editor. + +Homepage: + +## radare2 + +Use `pkg install radare2` to install an advanced hexadecimal editor. + +Homepage: \ No newline at end of file diff --git a/docs/en/IDEs.md b/docs/en/IDEs.md new file mode 100644 index 0000000000..6e7f8a3d3b --- /dev/null +++ b/docs/en/IDEs.md @@ -0,0 +1,48 @@ +An integrated development environment (IDE) is a software application +that provides comprehensive facilities to computer programmers for +software development. An IDE normally consists of at least a source code +editor, build automation tools and a debugger. + +# Codiad + +![](images/Codiad.jpg) + +[Codiad Web IDE](https://github.com/Codiad/Codiad) Codiad is a web-based +IDE framework with a small footprint and minimal requirements. + +Codiad was built with simplicity in mind, allowing for fast, interactive +development without the massive overhead of some of the larger desktop +editors. That being said even users of IDE's such as Eclipse, NetBeans +and Aptana are finding Codiad's simplicity to be a huge benefit. While +simplicity was key, we didn't skimp on features and have a team of +dedicated developer actively adding more. + +Rnauber has created a script for installing the web-based IDE/editor +codiad locally: + +`   bash <(wget -qO- `[`https://gist.githubusercontent.com/rnauber/9f579d1480db4cc5a9a3c97c00c52fb9/raw/install_codiad.sh`](https://gist.githubusercontent.com/rnauber/9f579d1480db4cc5a9a3c97c00c52fb9/raw/install_codiad.sh)` )` + +# Emacs + +![](images/Emacs.png) + +Package: emacs + +Description: An extensible, customizable, free/libre text editor — and +more. + +Homepage: + +# Vim + +![](images/Vim.png) + +Package: vim + +Description: Vim - the ubiquitous text editor + +Homepage: + +# See Also + +- [Editors](Editors) \ No newline at end of file diff --git a/docs/en/Image_Editors.md b/docs/en/Image_Editors.md new file mode 100644 index 0000000000..cf47f21ae2 --- /dev/null +++ b/docs/en/Image_Editors.md @@ -0,0 +1,99 @@ +Image editing encompasses the processes of altering images, whether they +are digital photographs, traditional photochemical photographs, or +illustrations. Traditional analog image editing is known as photo +retouching, using tools such as an airbrush to modify photographs, or +editing illustrations with any traditional art medium. Graphic software +programs, which can be broadly grouped into vector graphics editors, +raster graphics editors, and 3D modelers, are the primary tools with +which a user may manipulate, enhance, and transform images. Many image +editing programs are also used to render or create computer art from +scratch. + +## dcraw + +Raw digital camera images decoding utility + +Homepage: + +## gifsicle + +Tool for creating, editing, and getting information about GIF images and +animations + +Homepage: + +## gmic + +Description: imageman + +Homepage: + +## graphicsmagick + +Collection of image processing tools + +Homepage: + +## graphicsmagick++ + +Format-independent image processing - C++ shared library + +Homepage: + +## imagemagick + +Suite to create, edit, compose, or convert images in a variety of +formats + +Homepage: + +## netpbm + +Toolkit for manipulation of graphic images, including conversion of +images between a variety of different formats + +Homepage: + +## openjpeg-tools + +Command-line tools using the JPEG 2000 library + +Homepage: + +## optipng + +PNG optimizer that recompresses image files to a smaller size, without +losing any information + +Homepage: + +## Perl + + + +## Python + + + +The Python Imaging Library adds image processing capabilities to your +Python interpreter. + +This library provides extensive file format support, an efficient +internal representation, and fairly powerful image processing +capabilities. + +The core image library is designed for fast access to data stored in a +few basic pixel formats. It should provide a solid foundation for a +general image processing tool. + +To install Pillow Termux \$ pkg install libjpeg-turbo + +\$ LDFLAGS="-L/system/lib/" +CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install Pillow + + + + +## Ruby + + \ No newline at end of file diff --git a/docs/en/Installation.md b/docs/en/Installation.md new file mode 100644 index 0000000000..66f1f376b2 --- /dev/null +++ b/docs/en/Installation.md @@ -0,0 +1,24 @@ +You can install Termux from +[F-Droid](https://f-droid.org/repository/browse/?fdid=com.termux). + +- [Instructions for F-Droid](Installing_from_F-Droid) +- [Instructions for installing addons](Installing_Addons) + + + +## Google Play versions are deprecated + +Since 2 November 2020, we are unable to publish new versions on Google +Play. Please use Termux from F-Droid. + +Summary about Google Play Termux issues: + +- Outdated repository URLs which lead to HTTP 403 and 404 errors. +- No application and add-ons updates anymore. +- Application has known issues which are fixed in F-Droid builds only. + +## See Also + +- [Addons](Addons) +- [Package Management](Package_Management) +- [Software](Software) \ No newline at end of file diff --git a/docs/en/Installing_from_F-Droid.md b/docs/en/Installing_from_F-Droid.md new file mode 100644 index 0000000000..37c27a950f --- /dev/null +++ b/docs/en/Installing_from_F-Droid.md @@ -0,0 +1,23 @@ +How to install Termux app from F-Droid: + +1. Open F-Droid on your Android or Chrome OS device by tapping [this + link](https://f-droid.org/packages/com.termux/), +2. Tap Download APK, +3. Tap the downloaded APK on your device, +4. Tap allow installation of apps from unknown sources (you will want + to set this option anyway to be able to install [apps built on your + device](Working_with_APKs) in Termux), +5. Allow the installation to complete, +6. Once installed, you will see the Termux launcher on your home screen + and in your App Drawer. Tap the icon to fire up the application. + +Please do not mix your installation of Termux between Google Play and +F-Droid. There are compatibility issues such as, "[Can't install +Termux:Api from google play on Nougat +\#53](https://github.com/termux/termux-api/issues/53)". + +## See Also + +- [Installation](Installation) +- [Disclaimer](Disclaimer) +- [Package Management](Package_Management) \ No newline at end of file diff --git a/docs/en/Intents_and_Hooks.md b/docs/en/Intents_and_Hooks.md new file mode 100644 index 0000000000..863d4a1d89 --- /dev/null +++ b/docs/en/Intents_and_Hooks.md @@ -0,0 +1,15 @@ +Termux is able to catch several intents and execute shell scripts to act +upon them: + +- Sharing single files with Termux. + Following handle will be executed:`~/bin/termux-file-editor` + - Opening in your popular editor by using a symbolic link: + `ln -s $PREFIX/bin/nvim ~/bin/termux-file-editor` + - Creating a handle by creating a file and changing the access rights: + 1. `nano ~/bin/termux-file-editor`) + 2. `chmod +x ~/bin/termux-file-editor`) +- URL sharing available in common apps (e.g. Youtube). + Following handle will be executed: `~/bin/termux-url-opener` + - Sharing a URL to be downloaded. + You can handle incoming URL by editing the content. + `yoursth-dl -f 'bestvideo[ext=mp4][height<=720]+bestaudio' --restrict-filenames -o '~/storage/downloads/%(title)s-%(id)s.%(ext)s' $1` \ No newline at end of file diff --git a/docs/en/Internal_and_external_storage.md b/docs/en/Internal_and_external_storage.md new file mode 100644 index 0000000000..04427f7022 --- /dev/null +++ b/docs/en/Internal_and_external_storage.md @@ -0,0 +1,146 @@ +There are three main types of storage in Termux: + +1. Internal storage: files put in \$HOME, available from inside Termux + or when explictly picked in a SAF-compatible file manager. +2. Shared storage: general purpose file storage available for the all + applications. You need to grant Termux storage access permission to + use it. +3. External storage: external SD cards or USB hard drives. Typically + read-only, except the Termux private directory. + + +See below for detailed feature comparison between storage types: + +| Storage type | chmod/chown support | Special files support | Executables support | Access mode | +|----------------------------|---------------------|-----------------------|---------------------|-------------------| +| Internal (\$HOME/\$PREFIX) | yes | yes | yes | RW (app dir) | +| Shared storage | no | no | no | RW | +| External storage | no | no | no | RO / RW (app dir) | + +Full read-write access to external SD cards and USB drives is available +only on rooted devices. *For those who are curious why some applications +can write on external storage without restriction: these applications +use a special APIs (Storage Access Framework) not available for command +line applications.* + +Shared storage as well as external storage is not suitable for +installing software. Do not even try to move Termux directories like +\$HOME or \$PREFIX onto this kind of storage. Such option is only +available for advanced users who have rooted device and are familiar +with customization of partitions and file system on their external +storage. Use of adoptable storage will not make your external SD card +compatible with Termux, it is effectively same as shared storage +(EXT4/F2FS with FAT32/exFAT compatible overlay). + +After creating directory `Android/data/com.termux`, through file manager +or by `termux-setup-storage`, you can access your external SD directly +in this folder. The remainder of the external SD card will not be +accessable from Termux unless you grant storage permission for Termux in +Android. **Important:** Please remember that if you uninstall Termux app +this directory will be deleted! + +# Access shared and external storage + +To access shared and external storage you need to run +`termux-setup-storage`. You will then be prompted to "Allow Termux +access photos, media and files on your device", which you should allow. + +![](images/Termux-setup-storage.png) + +Executing termux-setup-storage ensures: + +1. That permission to shared storage is granted to Termux when running + on Android 6.0 or later. +2. That an app-private folder on external storage is created (if + external storage exists). +3. That a folder \$HOME/storage is created. + + +If you have Termux:API application and `termux-api` package installed, +you can use Android file picker to get any file from either shared or +external storage by using utility `termux-storage-get`. Example: + +`termux-storage-get filename.txt` + +File that has been chosen through file picker will be saved as +"filename.txt". + +# \~/storage + +The contents of the created \$HOME/storage folder are symlinks to +different storage folders: + +- The root of the shared storage between all apps. + +`~/storage/shared` + +- The standard directory for downloads from e.g. the system browser. + +`~/storage/downloads` + +- The traditional location for pictures and videos when mounting the + device as a camera. + +`~/storage/dcim` + +- Standard directory in which to place pictures that are available to + the user. + +`~/storage/pictures` + +- Standard directory in which to place any audio files that should be in + the regular list of music for the user. + +`~/storage/music` + +- Standard directory in which to place movies that are available to the + user. + +`~/storage/movies` + +- Symlink to a Termux-private folder on external storage (only if + external storage is available). + +`~/storage/external-1` + +**Important**: do not clear Termux application data through Android OS +Settings if you have any files placed to `~/storage/external-1`. If you +do so, all data will be lost as Android will wipe all directories +associated with Termux. + +![](images/FX_Termux_Home.jpg) + +# Access Termux from a file manager + +You can access Termux home directory (\$HOME) from the file manager +using Storage Access Framework and capable of accessing drives like USB +or external SD-card in read-write mode. + +Few recommended file managers which can access Termux home directory: + +- FX File Explorer: + +- Material Files: + + + +Steps to enable access to \$HOME are same as for any external drives: +open storage manager --\> select drive (Termux) --\> Select root +directory of storage. + +You may use the following command to launch Android internal file +manager which also allows to transfer files between Termux and other +storage volumes: + +`am start -a android.intent.action.VIEW -d "`[`content://com.android.externalstorage.documents/root/primary`](content://com.android.externalstorage.documents/root/primary)`"` + +And you can also start the +\[\| +Termux Filepicker\] too: + +`am start -a android.intent.action.OPEN_DOCUMENT -d /storage/emulated/0 -t '*/*'` + +Alternate way would be direct access to Termux home directory with +Superuser permissions. That's possible only on rooted devices. However, +using root to work with Termux files is not recommended way as you can +easily mess up file access modes and SELinux contexts. \ No newline at end of file diff --git a/docs/en/Lua.md b/docs/en/Lua.md new file mode 100644 index 0000000000..085e506bf2 --- /dev/null +++ b/docs/en/Lua.md @@ -0,0 +1 @@ +[https://github.com/termux/termux-packages/issues?utf8=✓&q=Lua](https://github.com/termux/termux-packages/issues?utf8=✓&q=Lua) \ No newline at end of file diff --git a/docs/en/MariaDB.md b/docs/en/MariaDB.md new file mode 100644 index 0000000000..0f86648a60 --- /dev/null +++ b/docs/en/MariaDB.md @@ -0,0 +1,42 @@ +MariaDB is a community-developed, commercially supported fork of the +MySQL relational database management system. + +## Installing package + +Install package "mariadb": + +`pkg install mariadb` + +The installation should finish without any error. If error occurred, you +probably need to report the issue on +[Github](https://github.com/termux/termux-packages/issues). + +The command shown above will also initialize the database with **2 +all-privilege accounts** (introduced perhaps in MariaDB 10.4.x). The +first one is "root" which is inaccessible and the second one with name +of your Termux user (check with command `id -un` or `whoami`). + +To enable access to root account, you need to login with your Termux +user name + +`mysql -u $(whoami)` + +and manually change password for root + +`use mysql;` +`set password for 'root'@'localhost' = password('YOUR_ROOT_PASSWORD_HERE');` +`flush privileges;` +`quit;` + +Verify that you are able to login as 'root' with `mysql -u root -p`. You +will need to provide password set in previous step. + +## Using package + +Whenever you want to access MySQL database manually through command line +or with some program (web application), you need to start MySQL server: + +`mysqld_safe` + +Then you should be able to connect to database, e.g. with +`mysql -u root -p`. \ No newline at end of file diff --git a/docs/en/No_more_-dev_packages.md b/docs/en/No_more_-dev_packages.md new file mode 100644 index 0000000000..a92c0e5582 --- /dev/null +++ b/docs/en/No_more_-dev_packages.md @@ -0,0 +1,21 @@ +As of July 28 2019 packages ending in **-dev** will no longer exist. + +These packages previously contained header files and other files needed +to build software on the device. As those files are small they are no +longer split out but instead merged into their main packages. + +# Example: ncurses + +Previously the package **ncurses-dev** contained the header files to +compile code using ncurses. This package no longer exists and the header +files are now a part of the **ncurses** package, along with the shared +libraries there. + +# What to do? + +- Run **pkg up** to update as normally. This will replace all **-dev** + packages with updated versions of main packages. +- If you are trying to execute scripts or follow a tutorial that tries + to install a **-dev** package, just remove the **-dev** suffix. +- If you have further questions, see the + [Community](Community) pages for where to ask questions. \ No newline at end of file diff --git a/docs/en/Node.js.md b/docs/en/Node.js.md new file mode 100644 index 0000000000..24eed74d1a --- /dev/null +++ b/docs/en/Node.js.md @@ -0,0 +1,82 @@ +Node.js is an open-source, cross-platform, JavaScript runtime +environment that executes JavaScript code outside a web browser. Node.js +lets developers use JavaScript to write command line tools and for +server-side scripting—running scripts server-side to produce dynamic web +page content before the page is sent to the user's web browser. + +![](images/Vscode_screenshot.jpg) + +In Termux Node.js is available in current and LTS versions which can be +installed by + +`pkg install nodejs` +`pkg install nodejs-lts` + +Only one of versions can be installed at a time. + +**Due to our infrastructure limits, we do not provide older versions of +packages. If you accidentally upgraded to unsuitable NodeJS or +NodeJS-LTS version and do not have backups to rollback, do not complain! +We recommend doing backups of \$PREFIX for developers and other people +who rely on specific software versions.** + +## Package management + +After installing Node.js, `npm` package manager will be available. Here +is a quick tutorial about its usage. + +Installing a new package globally: + +`npm install -g {package name}` + +Uninstall package installed globally: + +`npm uninstall -g {package name}` + +List packages installed globally: + +`npm list -g` + +If you working with Node.js packages project-wide, i.e. they should not +be installed into \$PREFIX, then remove command line argument `-g`. + +In addition to `npm`, a Yarn package manager can be used as well. You +can install it with + +`pkg install yarn` + +When installing Node.js packages, it is highly recommended to have a +Termux packages `build-essential` and `python` to be installed - they +are needed for building native extensions. + +## Node.js package installation tips and tricks + +It is assumed that you have `build-essential` and `python` already +installed. Some modules may require `binutils` to be installed, as they +unable to pick LLVM utilities (e.g. llvm-ar) for some reason. + +*Tip: help us to collect more information about installing Node.js +packages in Termux. You can also help to keep this information +up-to-date, because current instructions may eventually become +obsolete.* + + + + + + + + + + + + + + + + + + +

Package

Description

Dependencies

Special Instructions

code-server

VS Code IDE in a web browser.
+https://github.com/cdr/code-server

yarn

yarn global add code-server

\ No newline at end of file diff --git a/docs/en/OCR.md b/docs/en/OCR.md new file mode 100644 index 0000000000..db39da1f03 --- /dev/null +++ b/docs/en/OCR.md @@ -0,0 +1,32 @@ +Available OCR (Optical Character Recognition) packages for Termux +available on-the-fly are: + +Package: ocrad  + +Description: Optical Character Recognition program based on a feature +extraction method  +Homepage: + +Package: ocrad-dev  + +Description: Development files for ocrad  +Homepage: + +Package: tesseract  + +Description: Tesseract is probably the most accurate open source OCR +engine available  Homepage: https://github.com/tesseract-ocr/tesseract + +Package: tesseract-dev  + +Description: Development files for tesseract  +Homepage: https://github.com/tesseract-ocr/tesseract + +There probably are more OCR programs available as [Ruby +gems,](Ruby) [Python pips,](Python) [Perl +cpan](Perl) and similar. + +# See Also + +- [Other Package + Managers](Package_Management#Other_Package_Managers) \ No newline at end of file diff --git a/docs/en/OTG.md b/docs/en/OTG.md new file mode 100644 index 0000000000..42bb93c37e --- /dev/null +++ b/docs/en/OTG.md @@ -0,0 +1,19 @@ +![](images/USB-OTG.jpg) + +USB On-The-Go, often abbreviated to USB OTG or just OTG, is a +specification first used in late 2001 that allows USB devices, such as +tablets or smartphones, to act as a host, allowing other USB devices, +such as USB flash drives, digital cameras, +[mice](Hardware_Mouse) or +[keyboards](Hardware_Keyboard), to be attached to them. Use +of USB OTG allows those devices to switch back and forth between the +roles of host and device. For instance, a mobile phone may read from +removable media as the host device, but present itself as a USB Mass +Storage Device when connected to a host computer. + +# See Also + +- [Hardware Keyboard](Hardware_Keyboard) +- [Hardware Mouse](Hardware_Mouse) +- [OTG issues at Termux + Packages.](https://github.com/termux/termux-packages/issues?utf8=%E2%9C%93&q=OTG) \ No newline at end of file diff --git a/docs/en/PRoot.md b/docs/en/PRoot.md new file mode 100644 index 0000000000..d2da93f428 --- /dev/null +++ b/docs/en/PRoot.md @@ -0,0 +1,139 @@ +PRoot is a user-space implementation of +[chroot](https://en.m.wikipedia.org/wiki/Chroot), mount --bind, and +binfmt_misc. This means that users don't need any privileges or setup to +do things like using an arbitrary directory as the new root filesystem, +making files accessible somewhere else in the filesystem hierarchy, or +executing programs built for another CPU architecture transparently +through QEMU user-mode. + +You can install PRoot with this command: + +`pkg install proot` + +Termux maintains its own version of PRoot, which is compatible with the +latest Android OS versions. You can find its source code at +. + +**Important note**: PRoot can make program to appear under root user id +due to faking system call arguments and return values, but it does not +provide any way for the real privilege escalation. Programs requiring +real root access to modify kernel or hardware state will not work. + +## PRoot vs Chroot + +The main different of [chroot](https://en.m.wikipedia.org/wiki/Chroot) +from PRoot is that it is native. Unlike PRoot, it does not use +`ptrace()` for hijacking system call arguments and return values to fake +the visible file system layout or user/group IDs. It does not cause +overhead and works without issues on any device. However it requires +superuser permissions. + +If you have rooted device and want to have a better experience with +using the Linux distributions in Termux, then use `chroot`. In this case +get started with [Linux +Deploy](https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy) +app for automated distribution installation. Things like shell can be +used from Termux of course. + +## General usage information + +The main purpose of PRoot is to run the Linux distributions inside +Termux without having to root device. Simplest way to start a shell in a +distribution chroot is: + + unset LD_PRELOAD + proot -r ./rootfs -0 -w / -b /dev -b /proc -b /sys /bin/sh + +Where: + +- `unset LD_PRELOAD` - Termux-exec, execve() hook, conflicts with PRoot. +- `-r ./rootfs` - option to specify the rootfs where Linux distribution + was installed. +- `-0` - tells PRoot to simulate a root user which expected to be always + available in Linux distributions. This option will allow you to use + package manager. +- `-b /dev -b /proc -b /sys` - make file systems at /dev, /proc, /sys + appear in the rootfs. These 3 bindings are important and used by + variety of utilities. +- `/bin/sh` - a program that should be executed inside the rootfs. + Typically a shell. + +You can learn more about options supported by PRoot by executing +`proot --help`. + +## Installing Linux distributions + +Termux provides a package +[proot-distro](https://github.com/termux/proot-distro) which takes care +of management of the Linux distributions inside Termux. You can install +this utility by executing + +`pkg install proot-distro` + +For now it supports these distributions: + +- Alpine Linux (edge) +- Arch Linux / Arch Linux 32 / Arch Linux ARM +- Debian (stable) +- Fedora 35 +- Manjaro AArch64 +- OpenSUSE (Tumbleweed) +- Ubuntu (22.04) +- Void Linux + + +To install distribution, just run this command (assuming proot-distro is +installed): + +`proot-distro install ` + +where "" should be replaced by chosen distribution, e.g. +"alpine". Note that it is expected that you have a stable Internet +connection during installation, otherwise download may fail. + +After installation, you can start a shell session by executing next +command: + +`proot-distro login ` + +Here is a basic overview of the available proot-distro functionality: + +- `proot-distro list` - show the supported distributions and their + status. +- `proot-distro install` - install a distribution. +- `proot-distro login` - start a root shell for the distribution. +- `proot-distro remove` - uninstall the distribution. +- `proot-distro reset` - reinstall the distribution. + + +Run `proot-distro help` for built-in usage information. Note that each +of commands (with exception of "list") has own built-in usage +information which can be viewed by supplying "--help" as argument. More +detailed explanation about available functions you can find at project +page: + +Example of installing Debian and launching shell: + +`proot-distro install debian` +`proot-distro login debian` + +### Community scripts + +The ways of installation of Linux distributions in Termux are not +limited to `proot-distro` only. There are lots of community created +scripts, though their quality may be lower than that of the official +Termux utilities provide and third-party stuff is generally out of the +official Termux support. + +Here is the list of some community-provided scripts: + +- Alpine Linux - +- Arch Linux - +- Debian - +- Fedora - +- Kali Nethunter - +- Slackware - +- Ubuntu - + +If you decide to use third-party scripts, take the responsibility of +potential risks on your own. \ No newline at end of file diff --git a/docs/en/Package_Management.md b/docs/en/Package_Management.md new file mode 100644 index 0000000000..2a5505ee0b --- /dev/null +++ b/docs/en/Package_Management.md @@ -0,0 +1,158 @@ +Termux uses apt and dpkg for package management, similar to Ubuntu or +Debian. + +## Limitations + +Termux does not support use of packages from the Debian, Ubuntu and +other Linux distribution repositories. For this reason do not attempt +put these ones into your sources.list or manually installing their .deb +files. See [Differences from Linux](Differences_from_Linux) +to learn why. + +Additional restrictions: + +- Only single architecture is supported at the moment. You can't have + both 64 and 32 bit packages installed at the same time. +- Apt usage under root is restricted to prevent messing up ownership and + SELinux labels on Android /data partition. +- Downgrading is not supported. In order to reclaim disk space, we do + not keep history of package versions. + +## Using the package manager + +We strongly recommend to use a `pkg` utility instead of `apt` directly. +It is a wrapper that performs a number of tasks: + +- Provides command shortcuts. Use "pkg in" instead of "pkg install" or + "apt install". +- Automatically runs "apt update" before installing a package if + necessary. +- Performs some client side repository load-balancing by automatically + switching mirrors on a regular basis. *That is important to prevent us + hitting quota limit on hosting.* + + +Installing a new package: + +`pkg install package-name` + +It is highly recommended to upgrade existing packages before installing +the new one. You can install updates by running this command: + +`pkg upgrade` + +Additionally, we suggesting to check for updates at least once a week. +Otherwise there is a certain risk that during package installation or +upgrade you will encounter issues. + +Removing the installed package: + +`pkg uninstall package-name` + +This will remove package but modified configuration files will be left +intact. If you want to remove them, use `apt purge` instead. + +See below for additional supported commands: + +| Command | Description | +|---------------------------|--------------------------------------------| +| `pkg autoclean` | Remove outdated .deb files from the cache. | +| `pkg clean` | Remove all .deb files from the cache. | +| `pkg files ` | List files installed by specified package. | +| `pkg list-all` | List all available packages. | +| `pkg list-installed` | List currently installed packages. | +| `pkg reinstall ` | Re-install specified package. | +| `pkg search ` | Search package by query. | +| `pkg show ` | Show information about specific package. | + +## Official repositories + +The main Termux repository is accessible through +. + +We have some optional repositories which provide content on specific +topic and can be enabled by installing packages with name ending in +`-repo`. + +List of current optional repositories: + +| Repository | Command to subscribe to repository | +|--------------------------------------------------------------------------|------------------------------------| +| [game-packages](https://github.com/termux/game-packages) | `pkg install game-repo` | +| [science-packages](https://github.com/termux/science-packages) | `pkg install science-repo` | +| [termux-root-packages](https://github.com/termux/termux-root-packages) | `pkg install root-repo` | +| [x11-packages](https://github.com/termux/x11-packages) (Android 7+ only) | `pkg install x11-repo` | + +Packages for our official repositories are built from scripts located in +[github.com/termux/](https://github.com/termux) and are maintained and +signed by member of the [Termux developer +team](https://github.com/orgs/termux/people). Public keys for verifying +signatures are provided in package `termux-keyring`. For more +information about how the repositories are signed, see +[termux-keyring](termux-keyring). + +The mirrors of Termux apt repositories are available. See up-to-date +information about them [on +Github](https://github.com/termux/termux-packages/wiki/Mirrors). + +You can pick a mirror by using utility `termux-change-repo`. + +## Community repositories + +In addition to the official repositories, there are repositories hosted +by community members. You are welcome to host own Termux repository too. + +You can create own repository by using +[termux-apt-repo](https://github.com/termux/termux-apt-repo) from the +command line and [Github Pages](https://pages.github.com/) as hosting. +Be aware that Github has a strict limit of 100 MB per file and if your +repository exceeds total size of 1 GB, you might receive a polite email +from GitHub Support requesting that you reduce the size of the +repository. So if you have really big packages you may want to use a +different hostings. Choose hostings according to filetypes, for example, +videos can be hosted at or similar. + +### By [its-pointless](https://github.com/its-pointless/its-pointless.github.io) + +Repository of this community member includes **gcc**, **gfortran**, +**octave**, **r-cran** (R language), **scipy** and lots of games! + +To add this repository, execute: + + curl -LO https://its-pointless.github.io/setup-pointless-repo.sh + bash setup-pointless-repo.sh + +The script essentially installs gnupg on your device, downloads and adds +a public key to your apt keychain ensuring that all subsequent downloads +are from the same source. + +## Package requests + +Packages can be requested at +. Note that your +opened issue with request can be moved to another repository, like +[termux-root-packages](https://github.com/termux/termux-root-packages) +or [x11-packages](https://github.com/termux/x11-packages) if it is not +suitable for the main repository. + +Please ensure that you have read our [Packaging +Policy](https://github.com/termux/termux-packages/blob/master/CONTRIBUTING.md#a-note-about-package-requests). + +### Other package managers + +Some programming languages have their own package managers. We tend not +to package things installable with this ones due to issues when +cross-compiling them in our build environment. + +- [Node.js Package Management (npm)](Node.js) +- [Perl Package Management (cpan)](Perl) +- [Python Package Management (pip)](Python) +- [Ruby Package Management (gem)](Ruby) +- [TeX Live Package Management (tlmgr)](TeX_Live) +- [Rust Package Manager + (Cargo)](Development_Environments#Rust) + +# See Also + +- [Backing up Termux](Backing_up_Termux) +- [Building packages](Building_packages) \ No newline at end of file diff --git a/docs/en/Package_Tips.md b/docs/en/Package_Tips.md new file mode 100644 index 0000000000..dce18e1bd1 --- /dev/null +++ b/docs/en/Package_Tips.md @@ -0,0 +1,15 @@ +Some packages are troublesome to get working or configure in Termux. +Follow the individual page to get installation and configuration help. + +- [mariadb](MariaDB) +- [postgresql](postgresql) + +If you are interested in resolving issues regarding packages, please +post at and search +your topic before posting to avoid duplicates, please. You might even +find your question answered before asking. + +# See Also + +[Package Management: Other +PackagenManagers](Package_Management#Other_Package_Managers) \ No newline at end of file diff --git a/docs/en/Perl.md b/docs/en/Perl.md new file mode 100644 index 0000000000..46a4374274 --- /dev/null +++ b/docs/en/Perl.md @@ -0,0 +1,26 @@ +Perl is a high-level, general-purpose, interpreted, dynamic programming +language. It is used for system administration, network programming, +finance, bioinformatics, and other applications. It has been nicknamed +"the Swiss Army chainsaw of scripting languages" because of its +flexibility and power, and also its ugliness. + +In Termux Perl can be installed by executing this command + +`pkg install perl` + +Note that Termux provides only Perl 5 currently. + +## Package management + +Perl uses `cpan` utility for module management. However we recommend to +install `cpanminus` for installing modules easier: + +`cpan App::cpanminus` + +Now you can install Perl modules using + +`cpanm Module::Name` + +It is highly recommended to have `build-essential` Termux package to be +installed `pkg install build-essential`, so Perl will be able to build +native extensions. \ No newline at end of file diff --git a/docs/en/Postgresql.md b/docs/en/Postgresql.md new file mode 100644 index 0000000000..7f479314a0 --- /dev/null +++ b/docs/en/Postgresql.md @@ -0,0 +1,28 @@ +Create skeleton database + +`mkdir -p $PREFIX/var/lib/postgresql` +`initdb $PREFIX/var/lib/postgresql` + +Starting the database + +`pg_ctl -D $PREFIX/var/lib/postgresql start` + +Similarly stop the database using + +`pg_ctl -D $PREFIX/var/lib/postgresql stop` + +Create User + +`$ createuser --superuser --pwprompt yourUserName` + +Create your database: + +`$ createdb mydb` + +Open your database + +`$ psql mydb` + +You will now see the promt + +`mydb=#` \ No newline at end of file diff --git a/docs/en/Python.md b/docs/en/Python.md new file mode 100644 index 0000000000..342f58f3f1 --- /dev/null +++ b/docs/en/Python.md @@ -0,0 +1,275 @@ +Python is an interpreted, high-level, general-purpose programming +language. Created by Guido van Rossum and first released in 1991, +Python's design philosophy emphasizes code readability with its notable +use of significant whitespace. Its language constructs and +object-oriented approach aim to help programmers write clear, logical +code for small and large-scale projects. + +In Termux Python v3.x can be installed by executing + +`pkg install python` + +Legacy, deprecated version 2.7.x can be installed by + +`pkg install python2` + +**Warning**: upgrading major/minor version of Python package, for +example from Python 3.8 to 3.9, will make all your currently installed +modules unusable. You will need to reinstall them. However upgrading +patch versions, for example from 3.8.1 to 3.8.2, is safe. + +**Due to our infrastructure limits, we do not provide older versions of +packages. If you accidentally upgraded to unsuitable Python version and +do not have backups to rollback, do not complain! We recommend doing +backups of \$PREFIX for developers and other people who rely on specific +software versions.** + +## Package management + +After installing Python, `pip` (`pip2` if using python2) package manager +will be available. Here is a quick tutorial about its usage. + +Installing a new Python module: + +`pip install {module name}` + +Uninstalling Python module: + +`pip uninstall {module name}` + +Listing installed modules: + +`pip list` + +When installing Python modules, it is highly recommended to have a +package `build-essential` to be installed - some modules compile native +extensions during their installation. + +A few python packages are available from termux's package manager (for +python3 only), and should be installed from there to avoid compilation +errors. This is the case for: + +- numpy, `pkg install python-numpy` +- electrum, `pkg install electrum` +- opencv, `pkg install opencv-python` +- asciinema, `pkg install asciinema` +- matplotlib, `pkg install matplotlib` +- cryptography, `pkg install python-cryptography` + +## Python module installation tips and tricks + +It is assumed that you have `build-essential` or at least `clang`, +`make` and `pkg-config` installed. + +It also assumed that `termux-exec` is not broken and works on your +device. Environment variable `LD_PRELOAD` is not tampered or unset. +Otherwise you will need to patch modules' source code to fix all +shebangs! + +*Tip: help us to collect more information about installing Python +modules in Termux. You can also help to keep this information +up-to-date, because current instructions may eventually become +obsolete.* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Package

Description

Dependencies

Special Instructions

gmpy2

C-coded Python modules for fast multiple-precision +arithmetic.
+https://github.com/aleaxit/gmpy

libgmp libmpc libmpfr

lxml

Bindings to libxml2 and libxslt.
+https://lxml.de/

libxml2 libxslt

pandas

Flexible and powerful data analysis / manipulation library for +Python.
+https://pandas.pydata.org/

export CFLAGS="-Wno-deprecated-declarations -Wno-unreachable-code"
+pip install pandas

pynacl

Bindings to the Networking and Cryptography library.
+https://pypi.python.org/pypi/PyNaCl

libsodium

pillow

Python Imaging Library.
+https://pillow.readthedocs.io/en/stable/

libjpeg-turbo libpng

64-bit devices require running +export LDFLAGS="-L/system/lib64" before pip +command.

pyzmq

Bindings to libzmq.
+https://pyzmq.readthedocs.io/en/latest/

libzmq

On some devices the libzmq library can't be found by setup.py. If +pip install pyzmq does not work, try: +pip install pyzmq --install-option="--libzmq=/data/data/com.termux/files/usr/lib/libzmq.so"

+ +### Advanced installation instructions + +Some Python modules may not be easy to install. Here are collected +information on how to get them available in your Termux. + +#### Tkinter + +Tkinter is splitted of from the `python` package and can be installed by + +`pkg install python-tkinter` + +We do not provide Tkinter for Python v2.7.x. + +Since Tkinter is a graphical library, it will work only if X Windows +System environment is installed and running. How to do this, see page +[Graphical Environment](Graphical_Environment). + +### Installing Python modules from source + +Some modules may not be installable without patching. They should be +installed from source code. Here is a quick how-to about installing +Python modules from source code. + +1\. Obtain the source code. You can clone a git repository of your +package: + + git clone https://your-package-repo-url + cd ./your-package-repo + +or download source bundle with `pip`: + + pip download {module name} + unzip {module name}.zip + cd {module name} + +2\. Optionally, apply the desired changes to source code. There no +universal guides on that, perform this step on your own. + +3\. Optionally, fix the all shebangs. This is not needed if +`termux-exec` is installed and works correctly. + + find . -type f -not -path '*/\.*' -exec termux-fix-shebang "{}" \; + +4\. Finally install the package: + + python setup.py install + +## Troubleshooting + +### pip doesn't read config in `~/.config/pip/pip.conf` + +A.k.a. + +- virtualenv doesn't read config in + `~/.config/virtualenv/virtualenv.ini` / stores its data in + `/data/data/com.termux/files/virtualenv` . + + + +- pip / virtualenv doesn't follow freedesktop `$XDG_CONFIG_HOME` / + `$XDG_DATA_HOME` / `$XDG_CACHE_HOME` . + + + +- pylint / black doesn't store its cache in `~/.cache` but stores its + cache in `/data/data/com.termux/cache` . + +All of above are because of +[platformdirs](https://github.com/platformdirs/platformdirs). +Platformdirs aims to replace +[appdirs](https://github.com/ActiveState/appdirs), since [pip +v21.3.0](https://github.com/pypa/pip/pull/10202) and [virtualenv +v20.5.0](https://github.com/pypa/virtualenv/pull/2142), they started to +use platformdirs instead of appdirs. Appdirs doesn't do anything else on +Android, it just follows freedesktop standards. But platformdirs is +different, it takes termux as a simple Android app but not a unix +evironment. + +See details: [platformdirs issue +70](https://github.com/platformdirs/platformdirs/issues/70). + +It it predictable that all packages using platformdirs can't behave well +on termux, see: [1](https://libraries.io/pypi/platformdirs/dependents). +Before [PR 72](https://github.com/platformdirs/platformdirs/pull/72) is +merged, the only way to fix it is to patch it manually. + +There are two copies of platformdirs we need to patch: + +1. Pip vendors its own copy in + `$PREFIX/lib/pythonX.Y/site-packages/pip/_vendor`. +2. Platformdirs is installed as a dependency in + `$PREFIX/lib/pythonX.Y/site-packages`. (If it was installed by + `pip install --user`, the path is + `~/.local/lib/pythonX.Y/site-packages`.) + +Every time after we upgrade pip or platformdirs, we need to patch it +again. + +Patch for platformdirs before v2.5.0: + + --- __init__.py.bak 2022-03-09 02:21:09.888903935 +0800 + +++ __init__.py 2022-04-02 02:37:05.802427311 +0800 + @@ -18,7 +18,7 @@ + + + def _set_platform_dir_class() -> type[PlatformDirsABC]: + - if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system": + + if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system" and os.getenv("SHELL") is None: + module, name = "pip._vendor.platformdirs.android", "Android" + elif sys.platform == "win32": + module, name = "pip._vendor.platformdirs.windows", "Windows" + +Patch for platformdirs v2.5.0 or later: + + --- __init__.py.bak 2022-03-09 02:29:15.338903750 +0800 + +++ __init__.py 2022-04-02 02:44:38.992427138 +0800 + @@ -25,6 +25,10 @@ + from platformdirs.unix import Unix as Result + + if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system": + + + + if os.getenv("SHELL") is not None: + + return Result + + + from platformdirs.android import _android_folder + + if _android_folder() is not None: + +We can simply patch it by: + + patch ~/../usr/lib/python3.10/site-packages/pip/_vendor/platformdirs/__init__.py -i platformdirs.patch + +Notice that the two copies may be different versions, so they need +different patches. For example, pip v21.3 and v22.0 use platformdirs +v2.4, and the lastest version (on 2022-04-02) is v2.5.1. \ No newline at end of file diff --git a/docs/en/Recover_a_broken_environment.md b/docs/en/Recover_a_broken_environment.md new file mode 100644 index 0000000000..d3f8743129 --- /dev/null +++ b/docs/en/Recover_a_broken_environment.md @@ -0,0 +1,75 @@ +![](images/Start_failsafe_session.mp4) + +![](images/Termux-failsafe-recover.mp4) + +If Termux exits immediately after launch or cannot properly start shell, +it is likely that your environment is broken. The cause of which is most +likely a a fatal error in a dotfile read by your shell, which causes it +to immediately exit. To recover from such errors Termux provides a +Failsafe Session. + +## Launching a Failsafe Session + +1\. Close all sessions of Termux application. + +2\. Either long-press the termux launcher icon and then press "failsafe" +(only works on recent android versions) or long-press the "new session" +button in the left drawer inside the termux app. + +You are now in a Failsafe Session. It launches the default Shell of +Android `/system/bin/sh` with access to the Termux directory. Despite +the fact that Android shell is very limited, you can still save your +files to /sdcard or perform some recovery steps. + +## Fixing the Problem + +Now that you have basic access to Termux you can fix the problems. If +you don't know which dotfile is broken read the section about about +possible broken dotfiles below. It's most likely the one you tinkered +with the last. Once you have identified the broken dotfile, move it to a +new name. Example: + +`mv .profile .profile.bak` + +Now you can try to launch a normal session again. If it still doesn't +work, you'll have to check the other dotfiles again. Otherwise, since +you now have access to your Termux programs again, you can edit the file +with your text editor and fix the problem. After that you can move the +file back to it's original location. + +## Possible broken dotfiles + +If you use bash (default) these dotfiles get loaded: + +- `.profile` +- `.bash_profile` +- `.bashrc` + +If you use zsh: + +- `.profile` +- `.zshrc` + +### If you used chsh and set a broken shell + +If you used `chsh` to set your default shell to something that doesn't +work as a shell your environment will also be broken. In this case use +the Failsafe Session to remove `~/.termux/shell` and launch a new normal +session. + +`rm -rf /data/data/com.termux/files/home/.termux/shell` + +## If the problem is not with the dotfiles + +If the problem isn't with your dotfiles, you may have a broken +`$PREFIX`. This could have happened in various ways. Maybe there was a +broken update, something crashed at the wrong time or you messed around +int `$PREFIX` yourself. In this case, the best option is to use the +nuclear option. Remove `$PREFIX` entirely. + +`rm -rf /data/data/com.termux/files/usr` + +After that you can restart your Termux App completely, which will +trigger a reinstallation of the default `$PREFIX` contents. You'll have +to reinstall all your programs, but your `$HOME` folder remains +untouched, so all your dotfiles are still there. \ No newline at end of file diff --git a/docs/en/Remote_Access.md b/docs/en/Remote_Access.md new file mode 100644 index 0000000000..c3cbf582ff --- /dev/null +++ b/docs/en/Remote_Access.md @@ -0,0 +1,355 @@ +Termux is capable of accessing remote devices by using some common +tools. It is also possible to turn a device running Termux into remote +controlled server. + +# FTP + +**Warning**: plain FTP is deprecated and insecure anyway. Termux FTP +server supports only anonymous login, there no any authentication and +everyone on your network can access files on your device. Use SFTP +(OpenSSH) instead! + +Termux FTP server is based on busybox and service is managed by +\[Termux-services\]. If you decided to use FTP server, install these +packages: + +`pkg install busybox termux-services` + +After installation you need to restart session or source this file: + +`source $PREFIX/etc/profile.d/start-services.sh` + +Now you ready to enable and start the FTP daemon service: + +`sv-enable ftpd` +`sv up ftpd` + +FTP server will run on port 8021 in read-only mode. + +If you need to stop server, run `sv down ftpd`. + +# SSH + +SSH provides a secure way for accessing remote hosts and replaces tools +such as telnet, rlogin, rsh, ftp. Termux provides SSH via two packages: +**dropbear** and **openssh**. If you never used these tools before, it +is recommended to install 'openssh' as it is more common. + +## Using the SSH client + +You can obtain an SSH client by installing either \`openssh\` or +\`dropbear\`. + +### Usage example + +To login to a remote machine where the ssh daemon is running at the +standard port (22): + +`ssh user@hostname_or_ip` + +Same as above, but if the ssh daemon running on different port, e.g. +8022: + +`ssh -p 8022 user@hostname_or_ip` + +Using public key authentication with ssh running on the standard port +and a private key stored in the file \`id_rsa\`: + +`ssh -i id_rsa user@hostname_or_ip` + +Note, that if \`id_rsa\` will be stored in \`\~/.ssh\` directory, you +can omit specifying it in the command. But if you have multiple keys, it +is necessary to pick a specific key with \`-i {path_to_privkey}\`. + +#### SSH Agent + +**Important note**: this does not work for Dropbear. + +If you wish to use an SSH agent to avoid entering passwords, the Termux +openssh package provides a wrapper script named \`ssha\` (note the \`a\` +at the end) for ssh, which: + +- Starts the ssh agent if necessary (or connect to it if already + running). +- Runs the \`ssh-add\` if necessary. +- Runs the \`ssh\` with the provided arguments. + +This means that the agent will prompt for a key password at first run, +but remember the authorization for subsequent runs. + +## Using the SSH server + +### OpenSSH + +OpenSSH (also known as OpenBSD Secure Shell) is a suite of secure +networking utilities based on the Secure Shell (SSH) protocol, which +provides a secure channel over an unsecured network in a client–server +architecture. + +Default SSH port in Termux is 8022. + +#### Starting and stopping OpenSSH server + +Since Termux does not use initialization system, services are started +manually from command line. + +To start OpenSSH server, you need to execute this command: + +`sshd` + +If you need to stop \`sshd\`, just kill it's process: + +`pkill sshd` + +SSH daemon does logging to Android system log, you can view it by +running `logcat -s 'sshd:*'`. You can do that either from Termux or ADB. + +#### Setting up password authentication + +Password authentication is enabled by default. This will allow you to +get started with it much easier. Before proceeding, make sure that you +understand that password authentication is less secure than a +pubkey-based one. + +1\. Ensure that everything is up to date and package \`openssh\` is +installed: + +`pkg upgrade` +`pkg install openssh` + +2\. Password authentication is enabled by default in configuration file. +But you can still review it (\$PREFIX/etc/ssh/sshd_config), it should be +like this: + +`PrintMotd yes` +`PasswordAuthentication yes` +`Subsystem sftp /data/data/com.termux/files/usr/libexec/sftp-server` + +3\. Set new password. Execute command `passwd`. While program allows +minimal password length is 1 character, the recommended password length +is more than 8-10 characters. Passwords are not printed to console. + +`$ passwd` +`New password:` +`Retype new password:` +`New password was successfully set.` + +#### Setting up public key authentication + +Public key authentication is the recommended way for logging in using +SSH. To use this type of authentication, you need to have a +public/private key pair. For successful login, the public key must exist +in the authorized keys list on remote machine while private key should +be kept safe on your local host. + +In the following example it will be assumed that you want to establish +public key authentication between your PC (host) and your Android device +running Termux (remote). It also will be assumed that you running Linux +distribution on your PC. + +1\. If you do not have keys, you can generate them. In this example we +will generate RSA key. On PC, execute this command: + +`ssh-keygen -t rsa -b 2048 -f id_rsa` + +The command shown above generates private RSA key with 2048 bit key +length and saves it to file \`id_rsa\`. In the same directory you can +find a file \`id_rsa.pub\` – it is a public key. + +**Important note**: 2048 bit is the minimal key length that is +considered safe. You can use higher values, but do not use higher than +4096 as remote server may not support big keys. + +2\. Copy key to the remote machine (Termux). Password authentication has +to be enabled in order to install pubkey on remote machine. Now do: + +`ssh-copy-id -p 8022 -i id_rsa IP_ADDRESS` + +Do not forget to replace \`IP_ADDRESS\` with the actual LAN IP address +of your device. It can be determined by using command `ifconfig`. + +- Alternative you can manually copy the content inside + "id_rsa.pub"(public key) which is already on PC and looks like + `ssh-rsa `` user@host` and paste to the + Termux file `$HOME/.ssh/authorized_keys`(remote machine) Remember to + connect through `ssh user@`` -p 8022` so you can copy the + content of public key using any text editor available on PC and paste + inside Termux + + +If everything was okay, you will see a message like this one: + + Number of key(s) added: 1 + + Now try logging into the machine, with: "ssh -p '8022' '192.168.1.4'" + and check to make sure that only the key(s) you wanted were added. + +3\. From this point password authentication can be disabled. Edit file +\$PREFIX/etc/ssh/sshd_config and replace line beginning with +"PasswordAuthentication" by + +`PasswordAuthentication no` + +Then execute command `pkill sshd; sshd` in order to restart server with +updated configuration file. + +### Dropbear + +Dropbear is a software package written by Matt Johnston that provides a +Secure Shell-compatible server and client. It is designed as a +replacement for standard OpenSSH for environments with low memory and +processor resources, such as embedded systems. + +**Important note**: Dropbear does not provide SFTP server. + +#### Starting and stopping Dropbear server + +Same as for OpenSSH, you will need to execute it's binary manually. +Also, unlike OpenSSH, Dropbear does not use a configuration file but +only command line arguments. + +Server is running in background, both password and public key +authentication available. To achieve this, just type in console: + +`dropbear` + +If you need only public key authentication, do this instead: + +`dropbear -s` + +Also, server can be started in foreground. For this purpose use a +parameter \`-F\`: + +`dropbear -F` + +Server started in foreground can be stopped by just Ctrl-C key +combination. If it is in the background, then you can use a \`pkill\`: + +`pkill dropbear` + +#### Setting up password authentication + +Same as for OpenSSH, password authentication is enabled by default. + +Everything you have to do, is: + +1\. Make sure that everything is up to date and dropbear is installed: + +`pkg upgrade` +`pkg install dropbear` + +2\. Set password by executing command `passwd`. + +3\. Start dropbear server. You can execute either just `dropbear` to +start it in background or `dropbear -F` to start it in the foreground. + +#### Setting up public key authentication + +Same as for OpenSSH, you can put your keys by using `ssh-copy-id`. But +if you consider to setup a public key authentication from Termux to +something else, it is worth to mention some important differences +between OpenSSH and Dropbear. + +1\. Dropbear uses a different command for generating keys. Example of +generating RSA key (2048 bit): + +`dropbearkey -t rsa -f id_rsa -s 2048` + +2\. Public key should be obtained manually. To do this, you have to use +'dropbearkey' again, but in different way: + +`dropbearkey -f id_rsa -y` + +3\. Dropbear and OpenSSH uses a different key formats. To use a +Dropbear's key in OpenSSH, you will have to convert it: + +`dropbearconvert dropbear openssh ./id_rsa ./id_rsa_openssh` + +This procedure can be done vice versa to obtain a key in Dropbear's +format: + +`dropbearconvert openssh dropbear ./id_rsa_openssh ./id_rsa_dropbear` + +## Using the SFTP + +Package OpenSSH provides a tool for accessing remote hosts over SFTP. +This will allow you to work with files in same way as via FTP but with +better security. + +First install openssh-sftp-server + +`$ pkg install openssh-sftp-server` + +Connecting to Termux (sshd listening on port 8022): + +`$ sftp -P 8022 192.168.1.20` + +Connecting to somewhere else (sshd listening on standard port): + +`$ sftp sftp.example.com` + +However, to use command line SFTP client you should know some basic +commands: + +- **cd** PATH - change current directory to \`PATH\`. +- **get** REMOTE \[LOCAL\] - download file \`REMOTE\` and rename it as + \`LOCAL\` (optional). +- **mkdir** PATH - create directory \`PATH\`. +- **ls** \[PATH\] - list files in directory \`PATH\`. If no argument, + files in current directory will be listed. +- **put** LOCAL \[REMOTE\] - Upload file \`LOCAL\` and rename it as + \`REMOTE\` (optional). +- **rm** FILE - Delete file \`FILE\`. + +This is not a complete list of SFTP commands. To view all available +commands, consider to view man page (`man sftp`) or view short help in +interactive SFTP session by issuing command \`help\`. + +# MOSH + +Mosh is a remote terminal application that allows roaming, supports +intermittent connectivity, and provides intelligent local echo and line +editing of user keystrokes. + +### Usage example + +**Important note**: Mosh should be installed on both client and server +side. + +Connecting to remote host (sshd listening on standard port): + +`mosh user@ssh.example.com` + +Connecting to Termux (sshd listening on port 8022): + +`mosh --ssh="ssh -p 8022" 192.168.1.25` + +# Rsync + +Rsync is a tool for synchronizing files with remote hosts or local +directories (or drives). For better experience of using rsync, make sure +that package \`openssh\` (or \`dropbear\`) is installed. + +### Usage example + +Sync your photos with PC: + +`$ rsync -av /sdcard/DCIM/ user@192.168.1.20:~/Pictures/Android/` + +Get photos from remote Android device: + +`$ rsync -av -e 'ssh -p 8022' 192.168.1.3:/sdcard/DCIM/ /sdcard/DCIM/` + +Sync local directories (e.g. from external sdcard to Termux home): + +`$ rsync -av /storage/0123-4567/myfiles ~/files` + +You may want to see man page (\`man rsync\`) to learn more about it's +usage. + +# See Also + +[Accessing Termux from the Internet](Bypassing_NAT) + +[Connecting to Termux with SSH over +USB](https://glow.li/technology/2016/9/20/access-termux-via-usb/) \ No newline at end of file diff --git a/docs/en/Ruby.md b/docs/en/Ruby.md new file mode 100644 index 0000000000..4fcf2a75a3 --- /dev/null +++ b/docs/en/Ruby.md @@ -0,0 +1,58 @@ +![](images/GemServer.png) + +Ruby is a dynamic, open source programming language with a focus on +simplicity and productivity. It has an elegant syntax that is natural to +read and easy to write. + +In Termux Ruby can be installed by executing + +`pkg install ruby` + +**Due to our infrastructure limits, we do not provide older versions of +packages. If you accidentally upgraded to unsuitable Ruby version and do +not have backups to rollback, do not complain! We recommend doing +backups of \$PREFIX for developers and other people who rely on specific +software versions.** + +## Package management + +After installing ruby, `gem` package manager will be available. Here is +a quick tutorial about its usage. + +Installing a new gem: + +`gem install {package_name}` + +Uninstalling gem: + +`gem uninstall {package name}` + +Listing installed gems: + +`gem list --local` + +Launching a local documentation and gem repository server: + +`gem server` + +When installing Ruby gems, it is highly recommended to have a package +`build-essential` to be installed - some gems compile native extensions +during their installation. + +## Gem installation tips and tricks + +*Tip: help us to collect more information about installing Ruby gems in +Termux. You can also help to keep this information up-to-date, because +current instructions may eventually become obsolete.* + +| Package | Description | Dependencies | Special Instructions | +|---------------|-------------------------------------------------------------------------------------------------------------------|-----------------------------|------------------------------------------------| +| delayed_job | Database based asynchronous priority | | | +| ffi | A gem for loading dynamically-linked native libraries, binding functions within them | | | +| jekyll | Tool for creating static websites | ruby clang make libffi | | +| letter_opener | Preview mail in the browser instead of sending | | | +| lolcat | Prints rainbow colored text | | | +| mina | Blazing fast application deployment tool | | | +| nokogiri | XML and HTML library | libxslt libiconv pkg-config | gem install nokogiri -- --use-system-libraries | +| paperclip | Easy file attachment management for ActiveRecord | | | +| thin | A very fast & simple Ruby web server | ruby make | gem install thin -- --use-system-libraries | \ No newline at end of file diff --git a/docs/en/Sharing_Data.md b/docs/en/Sharing_Data.md new file mode 100644 index 0000000000..2f296a4bca --- /dev/null +++ b/docs/en/Sharing_Data.md @@ -0,0 +1,27 @@ +Files stored in the home directory in Termux is not accessible to other +applications by default. This is a limitation of Android itself. + +As a workaround, you can use `termux-open` available in termux-tools +package to share files with read access. + +`$ termux-open -h` +`Usage: termux-open [options] path-or-url` +`Open a file or URL in an external app.` +`  --send               if the file should be shared for sending` +`  --view               if the file should be shared for viewing (default)` +`  --chooser            if an app chooser should always be shown` +`  --content-type type  specify the content type to use` +`$ termux-open hello.c` + +For compatibility with standard Linux programs, `xdg-open` is symlinked +to `termux-open`. + +Sometimes, read access is not enough, you need to be able to modify +files. This can be achieved by storing the required files on an sdcard. +Android Lollipop should work right out of the box, but, Marshmallow and +above require the Termux app to request permissions to Read/Write +External Data. + +Run `termux-setup-storage` and grant permissions when the dialog pops +up. This will create a `$HOME/storage` directory with symlinks to +respective paths of sdcard(s). \ No newline at end of file diff --git a/docs/en/Shells.md b/docs/en/Shells.md new file mode 100644 index 0000000000..fab3a4c268 --- /dev/null +++ b/docs/en/Shells.md @@ -0,0 +1,82 @@ +A shell is an command language interpreter that executes commands from +standard input devices (like a keyboard) or from a file. Shells are not +a part of the system kernel, but use the system kernel to execute +programs, create files, etc. + +Use `chsh` from `termux-tools` to change your login shell. Currently +Termux supports bash, fish, tcsh, zsh and a few other shells. + +# BASH + +Homepage: + +Bash is the default shell after installing termux. +The BASH shell init files are `~/.bashrc`, `$PREFIX/etc/bash.bashrc` and +more. See \`man bash\` and \`info bash\` for more information. + +# Beanshell + +Homepage: + +Installation: `pkg install beanshell` + +Beanshell is a fully Java compatible scripting language. BeanShell is +now capable of interpreting ordinary Java source and loading .java +source files from the class path. BeanShell scripted classes are fully +typed and appear to outside Java code and via reflective inspection as +ordinary classes. However their implementation is fully dynamic and they +may include arbitrary BeanShell scripts in their bodies, methods, and +constructors. Users may now freely mix loose, unstructured BeanShell +scripts, method closures, and full scripted classes. + +# [FISH](FISH) + +Homepage: +Installation: `pkg install fish` + +FISH is a smart and user-friendly command line shell for macOS, Linux, +and the rest of the family. +The FISH shell init files are `~/.fish`, `$PREFIX/etc/fish/config.fish` +and more. See \`man fish\` and \`info fish\` for more information. + +[More information...](FISH) + +# IPython + +Homepage: +Installation: `pip install ipython` + +IPython is an advanced interactive shell for Python language. + +# TCSH + +Homepage: +Installation: `pkg install tcsh` + +TCSH is a C shell with file name completion and command line editing. +The TCSH shell init files are `~/.tcshrc`, `$PREFIX/etc/csh.cshrc` and +more. See \`man tcsh\` and \`info tcsh\` for more information. + +# Xonsh + +Homepage: +Installation: `pip install xonsh` + +Xonsh is a Python-powered, cross-platform, Unix-gazing shell language +and command prompt. The language is a superset of Python 3.4+ with +additional shell primitives that you are used to from Bash and IPython. +It works on all major systems including Linux, Mac OSX, and Windows. +Xonsh is meant for the daily use of experts and novices alike. + +# [ZSH](ZSH) + +Homepage: +Installation: `pkg install zsh` + +Zsh is a shell designed for interactive use, although it is also a +powerful scripting language. Many of the useful features of bash, ksh, +and tcsh were incorporated into zsh. +The zsh shell init files are `~/.zshrc` and `$PREFIX/etc/zshrc` and +more. See `man zsh` and `info zsh` for more information. + +[More information...](ZSH) \ No newline at end of file diff --git a/docs/en/Slackware.md b/docs/en/Slackware.md new file mode 100644 index 0000000000..e78785dfbb --- /dev/null +++ b/docs/en/Slackware.md @@ -0,0 +1,2 @@ +1. REDIRECT + [PRoot#Community_scripts](PRoot#Community_scripts) \ No newline at end of file diff --git a/docs/en/Software.md b/docs/en/Software.md new file mode 100644 index 0000000000..5e4850abfd --- /dev/null +++ b/docs/en/Software.md @@ -0,0 +1,13 @@ +Software that works in Termux on a smartphone and tablet in Android and +Chrome. Termux offers a wide range of software for your device. + +- [Development Environments](Development_Environments): Termux is a great software development environment. +- [Differences from Linux](Differences_from_Linux): There are several differences between Termux and a regular Linux distribution. +- [Editors](Editors): Edit, write and manipulate text and data files. +- [Graphical Environment](Graphical_Environment): Everything about using X Window System in Termux. +- [Intents and Hooks](Intents_and_Hooks): Use intents and hooks to access Termux from other apps. +- [Package Management](Package_Management): Basic and advanced package and module management. +- [Package Tips](Package_Tips): A list of manuals for packages that are tricky to install. +- [Remote Access](Remote_Access): Access your remote devices or the Termux itself. +- [Sharing Data](Sharing_Data): Accessing files in the \$HOME directory in other apps on device +- [Shells](Shells): A listing of some of the available shells in Termux. diff --git a/docs/en/Sound_Editors.md b/docs/en/Sound_Editors.md new file mode 100644 index 0000000000..e0f27bbf6e --- /dev/null +++ b/docs/en/Sound_Editors.md @@ -0,0 +1 @@ +1. REDIRECT [Audio Editors](Audio_Editors) \ No newline at end of file diff --git a/docs/en/Stream_Editors.md b/docs/en/Stream_Editors.md new file mode 100644 index 0000000000..16b9777010 --- /dev/null +++ b/docs/en/Stream_Editors.md @@ -0,0 +1,15 @@ +A Unix utility that parses and transforms text, using a simple, compact +programming language. Options for doing "stream editing" include awk, +node.js, perl and sed. + +## gawk + +Programming language designed for text processing + +Homepage: + +## sed + +GNU stream text editor + +Homepage: \ No newline at end of file diff --git a/docs/en/Switching_package_manager.md b/docs/en/Switching_package_manager.md new file mode 100644 index 0000000000..0a090e2d06 --- /dev/null +++ b/docs/en/Switching_package_manager.md @@ -0,0 +1,35 @@ +In this page, it is written how to change the package manager in termux. +Termux currently has 2 package managers, `apt` (default) and `pacman`. +To switch to another package manager, you need to change bootstrap based +on the specific package manager. + +#### Instruction: + +First you need to install bootstrap based on a specific package manager. + +- apt based bootstrap you can find + [here](https://github.com/termux/termux-packages/releases) +- pacman based bootstrap you can find + [here](https://github.com/termux-pacman/termux-packages/releases) + +The second step is to create a `usr-n/` directory next to `usr/`, then +move the bootstrap archive to `usr-n/` and unzip it. +The third step is to run the following command in the `usr-n/` directory +to create symbolic links. + +`cat SYMLINKS.txt | awk -F "←" '{system("ln -s '"'"'"$1"'"'"' '"'"'"$2"'"'"'")}'` + +The fourth step is to replace `usr/` with `usr-n/`, to do this, run +failsafe (how to run it is written [here](Fail-safe)), then +delete the old `usr/` directory and rename `usr-n/`. + +`cd ..` +`rm -fr usr/` +`mv usr-n/ usr/` + +**If you are switching to pacman then you need to follow this step.** +The fifth step, exit failsafe and start termux normally, then run the +following command to set up gpg keys for pacman. + +`pacman-key --init` +`pacman-key --populate` \ No newline at end of file diff --git a/docs/en/TeX_Live.md b/docs/en/TeX_Live.md new file mode 100644 index 0000000000..ed20ade9f9 --- /dev/null +++ b/docs/en/TeX_Live.md @@ -0,0 +1,67 @@ +Texlive can be installed through the package `texlive-installer`. The +package contains `termux-install-tl`, a wrapper around texlive's own +install-tl script. + +Texlive for termux needs several patches to work with termux's non +standard filesystem. There is a risk that updates through tlmgr break +our texlive since they might undo the various applied patches. If +texlive breaks after an update you can run `termux-patch-texlive` to +(try to) apply the patches again. + +When installing through termux-install-tl you cannot customize +everything, changing installation path or trying to use binaries from +upstream will break texlive. + +# TeX Live Package Management + +Texlive packages can be inatalled through texlive's package manager +tlmgr. + +The most up-to-date version of tlmgr documentation (updated nightly from +the development sources) is available at +, along with procedures for updating +tlmgr itself and information about test versions. A Texlive installation +can be customized and managed at any level. + +![](images/Texlive.png) + +## tlmgr info + +- `tlmgr search --global --file search.sty` will list available packages + containing the file `search.sty`. +- `tlmgr info collections` will list installed and available + collections. Collections usually means large downloading! +- `tlmgr info schemes` will list installed and available schemes. + Schemes means downloading even more and larger amazing tex goodies! + +## tlmgr install + +Single packages can be installed with + +` tlmgr install ` + +## tlmgr update + +Updating all install texlive packages can be done + +` tlmgr update --all` + +# Details on how texlive-installer works + +`texlive-installer` installs two scripts that can be run, +`termux-install-tl` and `termux-patch-texlive`. + +`termux-install-tl` runs a patched variant (some paths needs to be +changed) of upstream's install-tl script with an argument +(`-custom-bin`) pointing to the binaries that have been installed with +`texlive-bin`. If you want to run the installer with other arguments, +for example `-repository` pointing to a local mirror, you can run +`termux-install-tl -repository path/to/mirror`. You are then shown a +text gui where you have the opportunity to choose which schemes you want +to install. After all texlive packages have been downloaded and +installed `termux-patch-texlive` is run to fix known problems, mostly to +change paths (`/tmp` -\> `$PREFIX/tmp` and similar). + +If you at a later point run `tlmgr update` and end up with a +none-working texlive you might be able to fix the problems by running +`termux-patch-texlive`. \ No newline at end of file diff --git a/docs/en/Terminal_Settings.md b/docs/en/Terminal_Settings.md new file mode 100644 index 0000000000..3c49ffa6c3 --- /dev/null +++ b/docs/en/Terminal_Settings.md @@ -0,0 +1,145 @@ +The Termux terminal can be configured by editing the +`~/.termux/termux.properties` file. This file uses a simple `key=value` +property syntax. + +Lines beginning with `#` are comments and do not get executed. Most of +the properties are included as comments in the file. Uncomment an +existing line or add a new line to configure a property. + +For changes to take effect after editing the properties file, either +execute `termux-reload-settings` or restart Termux by closing all +sessions and starting the application again. + +# Dark theme + +Force the application to use dark theme for drawer and dialogs with + +``` ini +use-black-ui=true +``` + +*Note: This is enabled automatically on Android 9+ if the system UI uses +a dark theme.* + +# Fullscreen mode + +Enable fullscreen mode with + +``` ini +fullscreen=true +``` + +It is likely that with fullscreen enabled, the Extra Keys view may no +longer be visible. To fix, add + +``` ini +use-fullscreen-workaround=true +``` + +*Note: Fullscreen may not work well for all devices so consider it +unstable for now.* + +# Handling terminal sessions + +Use shortcut key combinations to handle common session actions. Add +shortcuts to open a new session, switch between sessions, and rename +sessions with + +``` ini +# Open a new terminal with ctrl + t (volume down + t) +shortcut.create-session=ctrl + t + +# Go one session down with (for example) ctrl + 2 +shortcut.next-session=ctrl + 2 + +# Go one session up with (for example) ctrl + 1 +shortcut.previous-session=ctrl + 1 + +# Rename a session with (for example) ctrl + n +shortcut.rename-session=ctrl + n +``` + +# Handling the bell character + +Adjust the behavior of how the [bell +character](https://en.wikipedia.org/wiki/Bell_character) is received +with the `bell-character` property + +``` ini +# Vibrate device (default). +bell-character=vibrate + +# Beep with a sound. +bell-character=beep + +# Ignore bell character. +bell-character=ignore +``` + +# Handling the back key + +Adjust the behavior of how the back key is handled with the `back-key` +property + +``` ini +# Send the Escape key. +back-key=escape + +# Hide keyboard or leave app (default). +back-key=back +``` + +# Handling the extra keys + +See [Touch Keyboard](Touch_Keyboard) + +# Workaround issues with some keyboards + +Some keyboards, e.g. a default one on Samsung devices, have issues with +text input: text appearing only after pressing "enter", wrong keyboard +layout being opened, etc. They are not compatible with the Termux input +method because enforcing a word-based input. As workaround, use + +``` ini +enforce-char-based-input = true +``` + +This will tell Termux to use +`InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS` +instead of `InputType.TYPE_NULL`. + +On some devices the combination of `ctrl + space` on hardware keyboards +does not work (for example in emacs) which makes it difficult to mark +text. As a workaround, use + +``` ini +ctrl-space-workaround = true +``` + +*Note: setting this on devices where `ctrl + space` already works will +break the functionality.* + +# Adjust Terminal Margin/Padding + +Terminal horizontal margin (left and right) can be adjuted with + +``` ini +terminal-margin-horizontal=val +``` + +And vertical margin (top and bottom) with + +``` ini +terminal-margin-vertical=val +``` + +Where `val` is an integer (representing dp units) between `0` and `100`. + +The default value is `3` for horizontal margin and `0` for vertical +margin. + +This can be helpful for some setups, such as text on screen edges not +being fully visible due to curvature or a screen protector/case. A +larger horizontal margin may also be helpful for those having gesture +navigation enabled on Android 10+ due to not being able to touch at +exactly the edge of the screen. \ No newline at end of file diff --git a/docs/en/Termux-battery-status.md b/docs/en/Termux-battery-status.md new file mode 100644 index 0000000000..ad4d3f13c8 --- /dev/null +++ b/docs/en/Termux-battery-status.md @@ -0,0 +1,12 @@ +Get the status of the device battery. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-brightness.md b/docs/en/Termux-brightness.md new file mode 100644 index 0000000000..76baa6817b --- /dev/null +++ b/docs/en/Termux-brightness.md @@ -0,0 +1,13 @@ +Set the display brightness. Note that this may not work if automatic +brightness control is enabled. + +## Usage + +termux-brightness \[brightness\] + +Brightness value should be between 0 and 255 or auto. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-call-log.md b/docs/en/Termux-call-log.md new file mode 100644 index 0000000000..bcba54e648 --- /dev/null +++ b/docs/en/Termux-call-log.md @@ -0,0 +1,17 @@ +Print the phone call history. + +## Usage + +termux-call-log \[options\] + +Output displayed in json format. + +### Options + +`-l limit   offset in call log list (default: 10)` +`-o offset  offset in call log list (default: 0)` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-camera-info.md b/docs/en/Termux-camera-info.md new file mode 100644 index 0000000000..45dabdbaf4 --- /dev/null +++ b/docs/en/Termux-camera-info.md @@ -0,0 +1,12 @@ +Get information about device camera(s). + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-camera-photo.md b/docs/en/Termux-camera-photo.md new file mode 100644 index 0000000000..5148d98f16 --- /dev/null +++ b/docs/en/Termux-camera-photo.md @@ -0,0 +1,16 @@ +Take a photo and save it to a file in JPEG format. + +## Usage + +termux-camera-photo \[-c camera-id\] output-file + +Photo is saved at specified file path. + +### Options + +`-c camera-id  ID of the camera to use (see termux-camera-info), default: 0` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-clipboard-get.md b/docs/en/Termux-clipboard-get.md new file mode 100644 index 0000000000..902d448955 --- /dev/null +++ b/docs/en/Termux-clipboard-get.md @@ -0,0 +1,12 @@ +Get the system clipboard text. + +## Usage + +This program does not take any arguments. + +Output is returned in plain text. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-clipboard-set.md b/docs/en/Termux-clipboard-set.md new file mode 100644 index 0000000000..e611d1e869 --- /dev/null +++ b/docs/en/Termux-clipboard-set.md @@ -0,0 +1,22 @@ +Set the system clipboard text. The text to set is either supplied as +arguments or read from stdin if no arguments are given. + +## Usage + +termux-clipboard-set \[text\] + +Text is read either from standard input or from command line arguments. + +### Examples + +`termux-clipboard-set "hello world"` + +`cat file.txt | termux-clipboard-set` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. + +[Termux-clipboard-get](Termux-clipboard-get) - Utility to +retrieve text from the clipboard. \ No newline at end of file diff --git a/docs/en/Termux-contact-list.md b/docs/en/Termux-contact-list.md new file mode 100644 index 0000000000..c48ddf64c2 --- /dev/null +++ b/docs/en/Termux-contact-list.md @@ -0,0 +1,12 @@ +List all contacts. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-dialog.md b/docs/en/Termux-dialog.md new file mode 100644 index 0000000000..b45f65df2c --- /dev/null +++ b/docs/en/Termux-dialog.md @@ -0,0 +1,62 @@ +Show dialog widget for user input. + +## Usage + +termux-dialog widget \[options\] + +Output is returned in json format. + +### Options + +`-l, list   List all widgets and their options` +`-t, title  Set title of input dialog (optional)` + +### Widget-specific options + + confirm - Show confirmation dialog + [-i hint] text hint (optional) + [-t title] set title of dialog (optional) + + checkbox - Select multiple values using checkboxes + [-v ",,,"] comma delim values to use (required) + [-t title] set title of dialog (optional) + + counter - Pick a number in specified range + [-r min,max,start] comma delim of (3) numbers to use (optional) + [-t title] set title of dialog (optional) + + date - Pick a date + [-t title] set title of dialog (optional) + [-d "dd-MM-yyyy k:m:s"] SimpleDateFormat Pattern for date widget output (optional) + + radio - Pick a single value from radio buttons + [-v ",,,"] comma delim values to use (required) + [-t title] set title of dialog (optional) + + sheet - Pick a value from sliding bottom sheet + [-v ",,,"] comma delim values to use (required) + [-t title] set title of dialog (optional) + + spinner - Pick a single value from a dropdown spinner + [-v ",,,"] comma delim values to use (required) + [-t title] set title of dialog (optional) + + speech - Obtain speech using device microphone + [-i hint] text hint (optional) + [-t title] set title of dialog (optional) + + text - Input text (default if no widget specified) + [-i hint] text hint (optional) + [-m] multiple lines instead of single (optional)* + [-n] enter input as numbers (optional)* + [-p] enter input as password (optional) + [-t title] set title of dialog (optional) + * cannot use [-m] with [-n] + + time - Pick a time value + [-t title] set title of dialog (optional) + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-download.md b/docs/en/Termux-download.md new file mode 100644 index 0000000000..1e9d91cb6a --- /dev/null +++ b/docs/en/Termux-download.md @@ -0,0 +1,20 @@ +Download a resource using the DownloadManager API which shows a +notification with your download details including a progress bar. + +## Usage + +termux-download \[-d description\] \[-t title\] \[-p path\] +url-to-download + +Does not return anything. + +### Options + +`-d description  description for the download request notification` +`-t title        title for the download request notification` +`-p path         path to save the downloaded file` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-exec.md b/docs/en/Termux-exec.md new file mode 100644 index 0000000000..afcd98f690 --- /dev/null +++ b/docs/en/Termux-exec.md @@ -0,0 +1,16 @@ +Termux-exec allows you to execute scripts with shebangs for traditional +Unix file structures. So shebangs like `#!/bin/sh` and +`#!/usr/bin/env python` should be able to run without +[termux-fix-shebang](termux-fix-shebang). + +After upgrading to apt version 1.4.8-1 or more recent, termux-exec +should be already installed as dependency of apt, if not — it is time to +run `pkg upgrade` and then restart Termux application. + +If you are not able to run scripts with shebangs like `#!/bin/sh` even +if termux-exec is installed, try to reset LD_PRELOAD environment +variable: + +`export LD_PRELOAD=${PREFIX}/lib/libtermux-exec.so` + +and then restart Termux session. \ No newline at end of file diff --git a/docs/en/Termux-fingerprint.md b/docs/en/Termux-fingerprint.md new file mode 100644 index 0000000000..8b587cdcb2 --- /dev/null +++ b/docs/en/Termux-fingerprint.md @@ -0,0 +1,17 @@ +Use fingerprint sensor on device to check for authentication. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## Note + +This API is available only for devices running Android 6 (Marshmallow) +or higher. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-fix-shebang.md b/docs/en/Termux-fix-shebang.md new file mode 100644 index 0000000000..f3c03d2498 --- /dev/null +++ b/docs/en/Termux-fix-shebang.md @@ -0,0 +1,18 @@ +**There is a newer and simpler solution, install +[termux-exec](termux-exec) to resolve this matter.** + +Only files within Termux’s private space can be made executable. So any +executable files such as shell scripts need to be kept inside the apps +native space unless you run them through a shell, e.g. `sh script.sh`, +`bash script.sh`, `csh script.sh`, etc... + +Since the usual location `/bin` is +`/data/data/com.termux/files/usr/bin`, also known as `$PREFIX/bin`, this +can cause problems with scripts which have a shebang such as +`#!/bin/sh`. This can be fixed by using `termux-fix-shebang` on the +shell scripts. For example: + +`  termux-fix-shebang script.sh` +`  ./script.sh` + +Now `script.sh` should run correctly. \ No newline at end of file diff --git a/docs/en/Termux-infrared-frequencies.md b/docs/en/Termux-infrared-frequencies.md new file mode 100644 index 0000000000..774e4cb9e8 --- /dev/null +++ b/docs/en/Termux-infrared-frequencies.md @@ -0,0 +1,16 @@ +Query the infrared transmitter's supported carrier frequencies. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## Note + +This API can be used only on devices that have infrared transmitter. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-infrared-transmit.md b/docs/en/Termux-infrared-transmit.md new file mode 100644 index 0000000000..3b71d35e5e --- /dev/null +++ b/docs/en/Termux-infrared-transmit.md @@ -0,0 +1,21 @@ +Transmit an infrared pattern. + +## Usage + +termux-infrared-transmit -f frequency pattern + +The pattern is specified in comma-separated on/off intervals, such as +'20,50,20,30'. Only patterns shorter than 2 seconds will be transmitted. + +### Options + +`-f frequency  IR carrier frequency in Hertz. Mandatory.` + +## Note + +This API can be used only on devices that have infrared transmitter. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-keyring.md b/docs/en/Termux-keyring.md new file mode 100644 index 0000000000..e705af7e15 --- /dev/null +++ b/docs/en/Termux-keyring.md @@ -0,0 +1,26 @@ +The various official package repositories are maintained and signed by +the members of the [termux-team](https://github.com/orgs/termux/people). +Each member has there own GPG key that is used for signing and the +public component of these keys are available in the package +`termux-keyring`. Installing termux-keyring makes apt recognize and +trust these keys, which is necessary for updating, and downloading from, +the repositories. + +## Current keys in termux-keyring + +### Grimler's key + +[Grimler's](https://github.com/Grimler91) key is available as the file +[grimler.gpg](https://github.com/termux/termux-packages/blob/master/packages/termux-keyring/grimler.gpg) +and has fingerprint + +`2C7F 29AE 9789 1F64 19A9  E2CD B007 6E49 0B71 616B` + +### Automatic build's key + +When packages are built and uploaded automatically using CI/CD, the +repository is signed with the key +[termux-autobuilds.gpg](https://github.com/termux/termux-packages/blob/master/packages/termux-keyring/termux-autobuilds.gpg) +and has fingerprint + +`CC72 CF8B A7DB FA01 8287  7D04 5A89 7D96 E57C F20C` \ No newline at end of file diff --git a/docs/en/Termux-location.md b/docs/en/Termux-location.md new file mode 100644 index 0000000000..9ec20ff6b8 --- /dev/null +++ b/docs/en/Termux-location.md @@ -0,0 +1,32 @@ +Get the device location. + +## Usage + +termux-location \[-p provider\] \[-r request\] + +Output displayed in json format. + +### Options + +`-p provider  location provider [gps/network/passive] (default: gps)` +`-r request   kind of request to make [once/last/updates] (default: once)` + +## Note + +- GPS likely will not work in buildings as device must be exposed to + satellite signal. + + + +- GPS also requires that your device clock is set correctly. For the + answer to question why, learn how GPS works. + + + +- Do not expect immediate location result. Even network location request + may take some time. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-media-player.md b/docs/en/Termux-media-player.md new file mode 100644 index 0000000000..c7e672a4a6 --- /dev/null +++ b/docs/en/Termux-media-player.md @@ -0,0 +1,18 @@ +Play specified file using Media Player API. + +## Usage + +termux-media-player \[command\] \[args\] + +### Commands + +`info        Displays current playback information` +`play        Resumes playback if paused` +`play `` Plays specified media file` +`pause       Pauses playback` +`stop        Quits playback` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-media-scan.md b/docs/en/Termux-media-scan.md new file mode 100644 index 0000000000..6ae047afa3 --- /dev/null +++ b/docs/en/Termux-media-scan.md @@ -0,0 +1,17 @@ +Scan the specified file(s) and add to the media content provider. + +## Usage + +termux-media-scan \[-v\] \[-r\] file \[file...\] + +Output displayed in plain text (informational message). + +### Options + +`-r  scan directories recursively` +`-v  verbose mode` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-microphone-record.md b/docs/en/Termux-microphone-record.md new file mode 100644 index 0000000000..7115b8d3ee --- /dev/null +++ b/docs/en/Termux-microphone-record.md @@ -0,0 +1,22 @@ +Record using microphone on your device. + +## Usage + +termux-microphone-record \[args\] + +### Options + +`-d           Start recording w/ defaults` +`-f ``    Start recording to specific file` +`-l ``   Start recording w/ specified limit (in seconds, unlimited for 0)` +`-e `` Start recording w/ specified encoder (aac, amr_wb, amr_nb)` +`-b `` Start recording w/ specified bitrate (in kbps)` +`-r ``    Start recording w/ specified sampling rate (in Hz)` +`-c ``   Start recording w/ specified channel count (1, 2, ...)` +`-i           Get info about current recording` +`-q           Quits recording` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-notification-remove.md b/docs/en/Termux-notification-remove.md new file mode 100644 index 0000000000..4eee7a4672 --- /dev/null +++ b/docs/en/Termux-notification-remove.md @@ -0,0 +1,13 @@ +Remove a notification previously shown with "termux-notification --id". + +## Usage + +termux-notification-remove \[id\] + +Notification id is a value previously used to show notification with +command "termux-notification". + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-notification.md b/docs/en/Termux-notification.md new file mode 100644 index 0000000000..91754cf41f --- /dev/null +++ b/docs/en/Termux-notification.md @@ -0,0 +1,67 @@ +Display a system notification. Content text is specified using +-c/--content or read from stdin. + +## Usage + +termux-notification \[options\] + +### Options + +` --action action          action to execute when pressing the notification` +` --alert-once             do not alert when the notification is edited` +` --button1 text           text to show on the first notification button` +` --button1-action action  action to execute on the first notification button` +` --button2 text           text to show on the second notification button` +` --button2-action action  action to execute on the second notification button` +` --button3 text           text to show on the third notification button` +` --button3-action action  action to execute on the third notification button` +` -c/--content content     content to show in the notification. Will take precedence over stdin.` +` --group group            notification group (notifications with the same group are shown together)` +` -h/--help                show this help` +` --help-actions           show the help for actions` +` -i/--id id               notification id (will overwrite any previous notification with the same id)` +` --image-path path        absolute path to an image which will be shown in the notification` +` --led-color rrggbb       color of the blinking led as RRGGBB (default: none)` +` --led-off milliseconds   number of milliseconds for the LED to be off while it's flashing (default: 800)` +` --led-on milliseconds    number of milliseconds for the LED to be on while it's flashing (default: 800)` +` --on-delete action       action to execute when the the notification is cleared` +` --ongoing                pin the notification` +` --priority prio          notification priority (high/low/max/min/default)` +` --sound                  play a sound with the notification` +` -t/--title title         notification title to show` +` --vibrate pattern        vibrate pattern, comma separated as in 500,1000,200` +` --type type              notification style to use (default/media)` + +Media actions (available with --type "media"): + +` --media-next             action to execute on the media-next button` +` --media-pause            action to execute on the media-pause button` +` --media-play             action to execute on the media-play button` +` --media-previous         action to execute on the media-previous button` + +### Action arguments + +Commands like --action, --on-delete, --button-1-action and --media-next +take an action string as their argument, which is fed to \`dash -c\`. A +few important things must be kept in mind when using actions: + +You should use actions that do things outside of the terminal, like +--action "termux-toast hello". Anything that outputs to the terminal is +useless, so the output should either be redirected (--action "ls \> +\~/ls.txt") or shown to the user in a different way (--action +"ls\|termux-toast"). + +Running more than one command in a single action is as easy as --action +"command1; command2; command3" or --action "if \[ -e file \]; then +termux-toast yes; else termux-toast no; fi". + +For anything more complex, you should put your script in a file, make it +executable, and use that as the action: --action \~/bin/script + +The action is run in a different environment (not a subshell). Thus your +environment is lost (most notably \$PATH), and \~/.profile is not +sourced either. So if you need your \$PATH you should either: + +- if the action is a script, set it explicitly in the script (e.g. + export PATH="\$HOME/bin:\$PATH") +- or use something like --action "bash -l -c 'command1; command2'"). \ No newline at end of file diff --git a/docs/en/Termux-sensor.md b/docs/en/Termux-sensor.md new file mode 100644 index 0000000000..7f8dd02820 --- /dev/null +++ b/docs/en/Termux-sensor.md @@ -0,0 +1,27 @@ +Get information about types of sensors as well as live data. + +## Usage + +termux-sensor \[options\] + +Output displayed in json format. + +### Options + +`-h, help           Show this help` +`-a, all            Listen to all sensors (WARNING! may have battery impact)` +`-c, cleanup        Perform cleanup (release sensor resources)` +`-l, list           Show list of available sensors` +`-s, sensors [,,,]  Sensors to listen to (can contain just partial name)` +`-d, delay [ms]     Delay time in milliseconds before receiving new sensor update` +`-n, limit [num]    Number of times to read sensor(s) (default: continuous) (min: 1)` + +## Note + +Different devices have different sensors. Check the available sensors +for your device with command `termux-sensor -l`. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-services.md b/docs/en/Termux-services.md new file mode 100644 index 0000000000..f551082661 --- /dev/null +++ b/docs/en/Termux-services.md @@ -0,0 +1,83 @@ +[termux-services](https://github.com/termux/termux-services) contains a +set of scripts for controlling services. Instead of putting commands in +\~/.bashrc or \~/.bash_profile, they can be started and stopped with +termux-services. + +| Package | Daemon | Port | Description | +|--------------|--------------|------|--------------------------------------------------------------------------------------------------------------------------------| +| apache2 | httpd | 8080 | Apache Web Server [HTTP Web Server](https://en.wikipedia.org/wiki/Web_server) | +| at | atd | | AT and batch delayed command scheduling utility and daemon [at](https://en.wikipedia.org/wiki/At_(command)) | +| bitcoin | bitcoind | | Bitcoin Core | +| busybox | telnetd | 8023 | Remote terminal service [Telnet](https://en.wikipedia.org/wiki/Telnet) | +| busybox | ftpd | 8021 | FTP (File Transfer Protocol) [FTP](https://en.wikipedia.org/wiki/File_Transfer_Protocol) | +| cronie | crond | | Daemon that runs specified programs at scheduled times [cron](https://en.wikipedia.org/wiki/Cron) | +| emacs | emacsd | | Extensible, customizable text editor-and more [EMACS](https://www.emacswiki.org/emacs/EmacsAsDaemon) | +| ipfs | ipfs | | A peer-to-peer hypermedia distribution protocol [IPFS](https://en.wikipedia.org/wiki/InterPlanetary_File_System) | +| libmosquitto | mosquitto | 1883 | MQTT is a lightweight, publish-subscribe network protocol [MQTT](https://en.wikipedia.org/wiki/MQTT) | +| lighttpd | lighttpd | 8080 | Lighttpd Small webserver HTTP Web Server | +| | | | | +| lnd | lnd | | Lightning Network Daemon | +| mariadb | mysqld | 3306 | [MariaDB](https://en.wikipedia.org/wiki/MariaDB) Community-developed fork of the MySQL from its original authors | +| mpd | mpd | | [Music Player Daemon (MPD)](https://en.wikipedia.org/wiki/Music_Player_Daemon) | +| mpdscribble | mpdscribble | | MPD client which submits tracks being played | +| nginx | nginx | 8080 | NGINX Web server HTTP Web Server | +| openssh | sshd | 8022 | OpenSSH [SSH](https://en.wikipedia.org/wiki/Secure_Shell_Protocol) | +| postgresql | postgres | 5432 | PostgreSQL database [PostgreSQL](https://en.wikipedia.org/wiki/PostgreSQL) | +| privoxy | privoxy | | Privoxy is non-caching web proxy with advanced filtering capabilities [HTTP Proxy](https://en.wikipedia.org/wiki/Proxy_server) | +| tor | tor | | The Onion Router anonymizing overlay network [Tor](https://en.wikipedia.org/wiki/Tor_(network)) | +| transmission | transmission | | BitTorrent client [BitTorrent](https://en.wikipedia.org/wiki/BitTorrent) | + +Supported services + +To install termux-services, run + +`pkg install termux-services` + +and then restart termux so that the service-daemon is started. + +To then enable and run a service, run + +`sv-enable ` + +If you only want to run it once, run + +`sv up ` + +To later stop a service, run: + +`sv down ` + +Or to disable it + +`sv-disable ` + +A service is disabled if \`\$PREFIX/var/service//down\` exists, +so the \`sv-enable\` and \`sv-disable\` scripts touches, or removes, +this file. + +termux-services uses the programs from +[runit](http://smarden.org/runit/) to control the services. A bunch of +example scripts are available from the [same +site](http://smarden.org/runit/runscripts.html). If you find a script +you want to use, or if you write your own, you can use set it up by +running: + +`mkdir -p $PREFIX/var/service/``/log` +`ln -sf $PREFIX/share/termux-services/svlogger $PREFIX/var/service/``/log/run` + +and then put your run script for the package at +\$PREFIX/var/service//run and make sure that it is runnable. + +You can then run + +`sv up ` + +to start it. + +Log files for services are situated in \$PREFIX/var/log/sv// with +the active log file named "current". + +### Starting termux-services on boot + +If you want your services to start on device boot, see the example in +[Termux:Boot](Termux:Boot) \ No newline at end of file diff --git a/docs/en/Termux-setup-storage.md b/docs/en/Termux-setup-storage.md new file mode 100644 index 0000000000..6f8113128f --- /dev/null +++ b/docs/en/Termux-setup-storage.md @@ -0,0 +1,69 @@ +In order to have access to shared storage (/sdcard or +/storage/emulated/0), Termux needs a storage access permission. It is +not granted by default and is not requested on application startup since +it is not necessary for normal application functioning. + +**Storage access permission will not enable write access to the external +sdcard and drives connected over USB.** + +## How To + +Open Termux application and do following steps: + +1. Execute command `termux-setup-storage`. If you already have executed + this command previously or for some reason already have `storage` + directory under \$HOME, utility will ask you to confirm wiping of + `~/storage`. This is safe as will only rebuild symlink set. +2. If permission request dialog was shown - grant permission. +3. Verify that you can access shared storage `ls ~/storage/shared` + +Termux uses utility `termux-setup-storage` to configure access to the +shared storage and setup these symlinks for quick access to various +kinds of storages: + +- The root of the shared storage between all apps. + +`~/storage/shared` + +- The standard directory for downloads from e.g. the system browser. + +`~/storage/downloads` + +- The traditional location for pictures and videos when mounting the + device as a camera. + +`~/storage/dcim` + +- Standard directory in which to place pictures that are available to + the user. + +`~/storage/pictures` + +- Standard directory in which to place any audio files that should be in + the regular list of music for the user. + +`~/storage/music` + +- Standard directory in which to place movies that are available to the + user. + +`~/storage/movies` + +- Symlink to a Termux-private folder on external storage (only if + external storage is available). + +`~/storage/external-1` + +### Android 11 + +You may get "Permission denied" error when trying to access shared +storage, even though the permission has been granted. + +Workaround: + +1. Go to Android Settings --\> Applications --\> Termux --\> + Permissions +2. Revoke Storage permission +3. Grant Storage permission again + +This is a known issue, though this is not Termux bug. \ No newline at end of file diff --git a/docs/en/Termux-share.md b/docs/en/Termux-share.md new file mode 100644 index 0000000000..477b31fa75 --- /dev/null +++ b/docs/en/Termux-share.md @@ -0,0 +1,22 @@ +Share a specified file or text from standard input. + +## Usage + +termux-share \[options\] \[file\] + +If file to share is not specified, program will read standard input. + +### Options + +`-a action        which action to performed on the shared content:` +`                 edit/send/view (default:view)` +`-c content-type  content-type to use (default: guessed from file extension,` +`                 text/plain for stdin)` +`-d               share to the default receiver if one is selected` +`                 instead of showing a chooser` +`-t title         title to use for shared content (default: shared file name)` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-sms-inbox.md b/docs/en/Termux-sms-inbox.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/en/Termux-sms-list.md b/docs/en/Termux-sms-list.md new file mode 100644 index 0000000000..3d7e89f132 --- /dev/null +++ b/docs/en/Termux-sms-list.md @@ -0,0 +1,21 @@ +List SMS messages. + +## Usage + +termux-sms-list \[options\] + +Output displayed in json format. + +### Options + +`-d         show dates when messages were created` +`-l limit   offset in sms list (default: 10)` +`-n         show phone numbers` +`-o offset  offset in sms list (default: 0)` +`-t type    the type of messages to list (default: inbox):` +`           all|inbox|sent|draft|outbox` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-sms-send.md b/docs/en/Termux-sms-send.md new file mode 100644 index 0000000000..7660679408 --- /dev/null +++ b/docs/en/Termux-sms-send.md @@ -0,0 +1,18 @@ +Send a SMS message to the specified recipient number(s). + +## Usage + +` termux-sms-send -n number[,number2,number3,...] [-s slot] [text]` + +The text to send is either supplied as arguments or read from stdin if +no arguments are given. + +### Options + +`-n number(s)  recipient number(s) - separate multiple numbers by commas` +`-s slot sim slot to use - silently fails if slot number is invalid or if missing READ_PHONE_STATE permission` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-storage-get.md b/docs/en/Termux-storage-get.md new file mode 100644 index 0000000000..8a69bb9e24 --- /dev/null +++ b/docs/en/Termux-storage-get.md @@ -0,0 +1,13 @@ +Request a file from the system and write it to the specified file. + +## Usage + +termux-storage-get \[output-file\] + +Output file is mandatory argument. Also, make sure that specified path +is writable. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-telephony-call.md b/docs/en/Termux-telephony-call.md new file mode 100644 index 0000000000..669c42c4e7 --- /dev/null +++ b/docs/en/Termux-telephony-call.md @@ -0,0 +1,12 @@ +Call a telephony number. + +## Usage + +termux-telephony-call \[number\] + +Requires a telephony number specified in appropriate format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-telephony-cellinfo.md b/docs/en/Termux-telephony-cellinfo.md new file mode 100644 index 0000000000..2e330de40b --- /dev/null +++ b/docs/en/Termux-telephony-cellinfo.md @@ -0,0 +1,13 @@ +Get information about all observed cell information from all radios on +the device including the primary and neighboring cells. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-telephony-deviceinfo.md b/docs/en/Termux-telephony-deviceinfo.md new file mode 100644 index 0000000000..a9c8d2880b --- /dev/null +++ b/docs/en/Termux-telephony-deviceinfo.md @@ -0,0 +1,12 @@ +Get information about the telephony device. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-toast.md b/docs/en/Termux-toast.md new file mode 100644 index 0000000000..66d57836f8 --- /dev/null +++ b/docs/en/Termux-toast.md @@ -0,0 +1,27 @@ +Show text in a Toast (a transient popup). + +## Usage + +termux-toast \[options\] \[text\] + +The text to show is either supplied as arguments or read from stdin if +no arguments are given. + +### Options + +`-h  show this help` +`-b  set background color (default: gray)` +`-c  set text color (default: white)` +`-g  set position of toast: [top, middle, or bottom] (default: middle)` +`-s  only show the toast for a short while` + +## Note + +Color can be a standard name (i.e. red) or 6 / 8 digit hex value (i.e. +"#FF0000" or "#FFFF0000") where order is (AA)RRGGBB. Invalid color will +revert to default value. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-torch.md b/docs/en/Termux-torch.md new file mode 100644 index 0000000000..6c33b54ea2 --- /dev/null +++ b/docs/en/Termux-torch.md @@ -0,0 +1,15 @@ +Toggle LED Torch on device. + +## Usage + +termux-torch \[on \| off\] + +Program accepts a one of these values: + +- on - enable torch. +- off - disable torch. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-tts-engines.md b/docs/en/Termux-tts-engines.md new file mode 100644 index 0000000000..65c463501a --- /dev/null +++ b/docs/en/Termux-tts-engines.md @@ -0,0 +1,14 @@ +Get information about the available text-to-speech (TTS) engines. The +name of an engine may be given to the termux-tts-speak command using the +-e option. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-tts-speak.md b/docs/en/Termux-tts-speak.md new file mode 100644 index 0000000000..56b1967a78 --- /dev/null +++ b/docs/en/Termux-tts-speak.md @@ -0,0 +1,44 @@ +Speak text with a system text-to-speech (TTS) engine. The text to speak +is either supplied as arguments or read from stdin if no arguments are +given. + +## Usage + +termux-tts-speak \[-e engine\] \[-l language\] \[-n region\] \[-v +variant\] \[-p pitch\] \[-r rate\] \[-s stream\] \[text-to-speak\] + +### Options + +` -e engine    TTS engine to use (see termux-tts-engines)` +` -l language  language to speak in (may be unsupported by the engine)` +` -n region    region of language to speak in` +` -v variant   variant of the language to speak in` +` -p pitch     pitch to use in speech. 1.0 is the normal pitch,` +`                lower values lower the tone of the synthesized voice,` +`                greater values increase it.` +` -r rate      speech rate to use. 1.0 is the normal speech rate,` +`                lower values slow down the speech` +`                (0.5 is half the normal speech rate)` +`                while greater values accelerates it` +`                (2.0 is twice the normal speech rate).` +` -s stream    audio stream to use (default:NOTIFICATION), one of:` +`                ALARM, MUSIC, NOTIFICATION, RING, SYSTEM, VOICE_CALL` + +## Tips & Tricks + +### Termux-tts-speak is slow to start + +It takes quite some time for it to actually play anything, but most of +that lost time comes due to startup time of the engine. You can keep the +engine running by using a fifo queue instead. + +`   mkfifo ~/.tts` +`   while true; do cat ~/.tts; done | termux-tts-speak` + +Then you can use it like this: + +`   echo Today is > ~/.tts` +`   date > ~/.tts` + +This will keep termux-tts-speak running and just play anything that's +send to `~/.tts` \ No newline at end of file diff --git a/docs/en/Termux-usb.md b/docs/en/Termux-usb.md new file mode 100644 index 0000000000..5193315b25 --- /dev/null +++ b/docs/en/Termux-usb.md @@ -0,0 +1,82 @@ +List or access USB devices. + +## Usage + +termux-usb \[-l \| \[-r\] \[-e command\] device\] + +### Options + +`-l               list available devices` +`-r               show permission request dialog if not already granted` +`-e command       execute the specified command with a file descriptor` +`                 referring to the device as its argument` + +### Details + +Android doesn't allow direct access to usb devices, you need to request +a file descriptor for the device from the Java API instead. This means +that Linux usb software will need to be modified to work within Termux. + +Here is a sample project to get started: + +Make sure you have the Termux:API application installed. Set up the +necessary packages within Termux. + +`pkg install termux-api libusb clang` + +Enable OTG (host) mode and insert a usb device. Wait for it to be +recognised and verify it using the API: + +`termux-usb -l` + +Let's assume the device is /dev/bus/usb/001/002. Ask for permission to +access it: + +`termux-usb -r /dev/bus/usb/001/002` + +Try using it from libusb. Save this sample code as usbtest.c: +[(download)](https://gist.githubusercontent.com/bndeff/8c391bc3fd8d9f1dbd133ac6ead7f45e/raw/6d7174a129301eeb670fe808cd9d25ec261f7f9e/usbtest.c) + +`#include ` +`#include ` +`#include ` + +`int main(int argc, char **argv) {` +`    libusb_context *context;` +`    libusb_device_handle *handle;` +`    libusb_device *device;` +`    struct libusb_device_descriptor desc;` +`    unsigned char buffer[256];` +`    int fd;` +`    assert((argc > 1) && (sscanf(argv[1], "%d", &fd) == 1));` +`    libusb_set_option(NULL, LIBUSB_OPTION_NO_DEVICE_DISCOVERY);` +`    assert(!libusb_init(&context));` +`    assert(!libusb_wrap_sys_device(context, (intptr_t) fd, &handle));` +`    device = libusb_get_device(handle);` +`    assert(!libusb_get_device_descriptor(device, &desc));` +`    printf("Vendor ID: %04x\n", desc.idVendor);` +`    printf("Product ID: %04x\n", desc.idProduct);` +`    assert(libusb_get_string_descriptor_ascii(handle, desc.iManufacturer, buffer, 256) >= 0);` +`    printf("Manufacturer: %s\n", buffer);` +`    assert(libusb_get_string_descriptor_ascii(handle, desc.iProduct, buffer, 256) >= 0);` +`    printf("Product: %s\n", buffer);` +`    if (libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber, buffer, 256) >= 0)` +`        printf("Serial No: %s\n", buffer);` +`    libusb_exit(context);` +`}` + +This utility shows some basic information about a usb device. It takes +the device file descriptor as its only command-line argument. Let's +compile it: + +`gcc usbtest.c -lusb-1.0 -o usbtest` + +Use the -e option of termux-usb to run ./usbtest with the correct file +descriptor: + +`termux-usb -e ./usbtest /dev/bus/usb/001/002` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-vibrate.md b/docs/en/Termux-vibrate.md new file mode 100644 index 0000000000..434537b3fe --- /dev/null +++ b/docs/en/Termux-vibrate.md @@ -0,0 +1,15 @@ +Vibrate the device. + +## Usage + +termux-vibrate \[options\] + +### Options + +`-d duration  the duration to vibrate in ms (default:1000)` +`-f           force vibration even in silent mode` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-volume.md b/docs/en/Termux-volume.md new file mode 100644 index 0000000000..f2b573c656 --- /dev/null +++ b/docs/en/Termux-volume.md @@ -0,0 +1,15 @@ +Change volume of specified audio stream. + +## Usage + +termux-volume \[stream\] \[volume\] + +Valid audio streams are: alarm, music, notification, ring, system, call. + +Call w/o arguments to show information about each audio stream (output +format is json). + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-wake-lock.md b/docs/en/Termux-wake-lock.md new file mode 100644 index 0000000000..e9f3af2790 --- /dev/null +++ b/docs/en/Termux-wake-lock.md @@ -0,0 +1,12 @@ +`termux-wake-lock` and `termux-wake-unlock` can be used to trigger a +wakelock which causes Android not to go into deep sleep. + +![](images/ScreenshotTermux720170903.png) + +Since the default login shell is bash; it could be useful to call +`termux-wake-lock` in your \~/.profile (or \~/.bash_profile where +appropriate) and `termux-wake-unlock` in your \~/.bash_logout; for +single session usage. For multiple sessions, you'll have to manage the +unlock call yourself. But it is an option to call bash once and use +`byobu` to get a multiple bash session running within a single termux +session. diff --git a/docs/en/Termux-wallpaper.md b/docs/en/Termux-wallpaper.md new file mode 100644 index 0000000000..04d5e6435f --- /dev/null +++ b/docs/en/Termux-wallpaper.md @@ -0,0 +1,16 @@ +Change wallpaper on your device. + +## Usage + +termux-wallpaper cmd \[options\] + +### Options + +`-f ``  set wallpaper from file` +`-u ``   set wallpaper from url resource` +`-l         set wallpaper for lockscreen (Nougat and later)` + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-wifi-connectioninfo.md b/docs/en/Termux-wifi-connectioninfo.md new file mode 100644 index 0000000000..f71eb01597 --- /dev/null +++ b/docs/en/Termux-wifi-connectioninfo.md @@ -0,0 +1,13 @@ +Print information about current Wi-Fi connection. This information +include: SSID (AP name), BSSID (AP mac address), device IP and other. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-wifi-enable.md b/docs/en/Termux-wifi-enable.md new file mode 100644 index 0000000000..be98e40cbc --- /dev/null +++ b/docs/en/Termux-wifi-enable.md @@ -0,0 +1,15 @@ +Toggles Wi-Fi on/off. + +## Usage + +termux-wifi-enable \[true \| false\] + +Program accepts a one of these values: + +- true - enable Wi-Fi +- false - disable Wi-Fi + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux-wifi-scaninfo.md b/docs/en/Termux-wifi-scaninfo.md new file mode 100644 index 0000000000..18b8059378 --- /dev/null +++ b/docs/en/Termux-wifi-scaninfo.md @@ -0,0 +1,17 @@ +Retrieves last wifi scan information. + +## Usage + +This program does not take any arguments. + +Output is returned in json format. + +## Note + +This API does not perform scanning. Instead, it retrieves information +about last scan done by Android OS. + +## See Also + +[Termux:API](Termux:API) - Termux addon that exposes device +functionality as API to command line programs. \ No newline at end of file diff --git a/docs/en/Termux:API.md b/docs/en/Termux:API.md new file mode 100644 index 0000000000..7c7dcd1e59 --- /dev/null +++ b/docs/en/Termux:API.md @@ -0,0 +1,70 @@ +This addon exposes device functionality as API to command line programs +in [Termux](https://github.com/termux/). + +## Installation + +Download the Termux:API add-on from +[F-Droid](https://f-droid.org/packages/com.termux.api/) or the Google +Play Store. It is required for the API implementations to function. + +**Important: Do not mix installations of Termux and Addons between +Google Play and F-Droid.** They are presented at these portals for your +convenience. There are compatibility issues when mixing installations +from these Internet portals. This is because each download website uses +a specific key for keysigning Termux and [Addons](Addons). + +### Installing termux-api package + +To use Termux:API you also need to install the +[termux-api](https://github.com/termux/termux-api-package) package. + +`pkg install termux-api` + +### Settings + +On Android 7 you may have to "protect" Termux:API by going into the +settings / protected apps menu otherwise calls to the API like +termux-battery-status will hang forever. See [issue +334](https://github.com/termux/termux-packages/issues/334#issuecomment-340581650). + +## Current API implementations + +[termux-battery-status](termux-battery-status):Get the status of the device battery. +[termux-brightness](termux-brightness):Set the screen brightness between 0 and 255. +[termux-call-log](termux-call-log):List call log history. +[termux-camera-info](termux-camera-info):Get information about device camera(s). +[termux-camera-photo](termux-camera-photo):Take a photo and save it to a file in JPEG format. +[termux-clipboard-get](termux-clipboard-get):Get the system clipboard text. +[termux-clipboard-set](termux-clipboard-set):Set the system clipboard text. +[termux-contact-list](termux-contact-list):List all contacts. +[termux-dialog](termux-dialog):Show a text entry dialog. +[termux-download](termux-download):Download a resource using the system download manager. +[termux-fingerprint](termux-fingerprint):Use fingerprint sensor on device to check for authentication. +[termux-infrared-frequencies](termux-infrared-frequencies):Query the infrared transmitter's supported carrier frequencies. +[termux-infrared-transmit](termux-infrared-transmit):Transmit an infrared pattern. +[termux-job-scheduler](termux-job-scheduler):Schedule a Termux script to run later, or periodically. +[termux-location](termux-location):Get the device location. +[termux-media-player](termux-media-player):Play media files. +[termux-media-scan](termux-media-scan):MediaScanner interface, make file changes visible to Android Gallery +[termux-microphone-record](termux-microphone-record):Recording using microphone on your device. +[termux-notification](termux-notification):Display a system notification. +[termux-notification-remove](termux-notification-remove):Remove a notification previously shown with termux-notification --id. +[termux-sensor](termux-sensor):Get information about types of sensors as well as live data. +[termux-share](termux-share):Share a file specified as argument or the text received on stdin. +[termux-sms-list](termux-sms-list):List SMS messages. +[termux-sms-send](termux-sms-send):Send a SMS message to the specified recipient number(s). +[termux-storage-get](termux-storage-get):Request a file from the system and output it to the specified file. +[termux-telephony-call](termux-telephony-call):Call a telephony number. +[termux-telephony-cellinfo](termux-telephony-cellinfo):Get information about all observed cell information from all radios on the device including the primary and neighboring cells. +[termux-telephony-deviceinfo](termux-telephony-deviceinfo):Get information about the telephony device. +[termux-toast](termux-toast):Show a transient popup notification. +[termux-torch](termux-torch):Toggle LED Torch on device. +[termux-tts-engines](termux-tts-engines):Get information about the available text-to-speech engines. +[termux-tts-speak](termux-tts-speak):Speak text with a system text-to-speech engine. +[termux-usb](termux-usb):List or access USB devices. +[termux-vibrate](termux-vibrate):Vibrate the device. +[termux-volume](termux-volume):Change volume of audio stream. +[termux-wallpaper](termux-wallpaper):Change wallpaper on your device. +[termux-wifi-connectioninfo](termux-wifi-connectioninfo):Get information about the current wifi connection. +[termux-wifi-enable](termux-wifi-enable):Toggle Wi-Fi On/Off. +[termux-wifi-scaninfo](termux-wifi-scaninfo):Get information about the last wifi scan. \ No newline at end of file diff --git a/docs/en/Termux:Boot.md b/docs/en/Termux:Boot.md new file mode 100644 index 0000000000..1e112d0461 --- /dev/null +++ b/docs/en/Termux:Boot.md @@ -0,0 +1,43 @@ +This addon will run scripts immediately after device was booted. + +## Installation + +Download add-on from +[F-Droid](https://f-droid.org/packages/com.termux.boot/) + +**Important: Do not mix installations of Termux and Addons between +Google Play and F-Droid.** They are presented at these portals for your +convenience. There are compatibility issues when mixing installations +from these Internet portals. This is because each download website uses +a specific key for keysigning Termux and [Addons](Addons). + +## Usage + +1\. Install the Termux:Boot app. + +2\. Go to Android settings and turn off battery optimizations for Termux +and Termux:Boot applications. + +3\. Start the Termux:Boot app once by clicking on its launcher icon. +This allows the app to be run at boot. + +4\. Create the \~/.termux/boot/ directory: Put scripts you want to +execute inside the \~/.termux/boot/ directory. If there are multiple +files, they will be executed in a sorted order. + +5\. It is helpful to run termux-wake-lock as first thing to prevent the +device from sleeping. + +Example: to start an sshd server and prevent the device from sleeping at +boot, create the following file at \~/.termux/boot/start-sshd: + +`#!/data/data/com.termux/files/usr/bin/sh` +`termux-wake-lock` +`sshd` + +If you want [Termux-services](Termux-services) to start +services on boot, you can use: + +`#!/data/data/com.termux/files/usr/bin/sh` +`termux-wake-lock` +`. $PREFIX/etc/profile` \ No newline at end of file diff --git a/docs/en/Termux:Float.md b/docs/en/Termux:Float.md new file mode 100644 index 0000000000..90ce060466 --- /dev/null +++ b/docs/en/Termux:Float.md @@ -0,0 +1,6 @@ +This addon provides the Termux console in a floating window. + +![](images/Termux_float.png) + +The usage and installation documentation is available at +. \ No newline at end of file diff --git a/docs/en/Termux:Styling.md b/docs/en/Termux:Styling.md new file mode 100644 index 0000000000..7455080f4f --- /dev/null +++ b/docs/en/Termux:Styling.md @@ -0,0 +1,32 @@ +This addon provides color schemes and fonts to customize the appearance +of your Termux terminal. + +## Installation + +Download add-on from +[F-Droid](https://f-droid.org/packages/com.termux.styling/) + +**Important: Do not mix installations of Termux and Addons between +Google Play and F-Droid.** They are presented at these portals for your +convenience. There are compatibility issues when mixing installations +from these Internet portals. This is because each download website uses +a specific key for keysigning Termux and [Addons](Addons). + +## How it works + +Styling add-on is just a package with pre-defined color schemes and font +files. When you use it to change terminal style, some files are being +extracted and placed at specific locations in home directory. + +Color schemes are written to + +`/data/data/com.termux/files/home/.termux/colors.properties` + +Fonts are placed at + +`/data/data/com.termux/files/home/.termux/font.ttf` + +User can place own files to these paths, which can be useful if a +certain font or color scheme is not available through the add-on. If you +wish to do styling configuration manually, Termux:Styling application is +not necessary. \ No newline at end of file diff --git a/docs/en/Termux:Task.md b/docs/en/Termux:Task.md new file mode 100644 index 0000000000..933f03c891 --- /dev/null +++ b/docs/en/Termux:Task.md @@ -0,0 +1 @@ +1. REDIRECT [Termux:Tasker](Termux:Tasker) \ No newline at end of file diff --git a/docs/en/Termux:Tasker.md b/docs/en/Termux:Tasker.md new file mode 100644 index 0000000000..0921d1d71b --- /dev/null +++ b/docs/en/Termux:Tasker.md @@ -0,0 +1,20 @@ +This add-on provides a Tasker plug-in to execute Termux programs. + +## Installation + +Download add-on from +[F-Droid](https://f-droid.org/packages/com.termux.tasker/) + +**Important: Do not mix installations of Termux and Addons between +Google Play and F-Droid.** They are presented at these portals for your +convenience. There are compatibility issues when mixing installations +from these Internet portals. This is because each download website uses +a specific key for keysigning Termux and [Addons](Addons). + +## Usage + +Create a new Tasker Action. In the resulting Select Action Category +dialog, select Plugin. In the resulting dialog, select Termux:Tasker. +Edit the configuration to specify the executable in \~/.termux/tasker/ +to execute, and if it should be executed in the background (the default) +or in a new terminal session. \ No newline at end of file diff --git a/docs/en/Termux:Widget.md b/docs/en/Termux:Widget.md new file mode 100644 index 0000000000..f52bdca586 --- /dev/null +++ b/docs/en/Termux:Widget.md @@ -0,0 +1,7 @@ +A Termux plugin app to run scripts in Termux with launcher shortcuts and +widgets. + +![](images/Termux_widget.png) + +The usage and installation documentation is available at +. \ No newline at end of file diff --git a/docs/en/Termux_Google_Play.md b/docs/en/Termux_Google_Play.md new file mode 100644 index 0000000000..0ab52313bc --- /dev/null +++ b/docs/en/Termux_Google_Play.md @@ -0,0 +1,23 @@ +Since November 2, 2020 we no longer able to publish updates of Termux +application and add-ons because we are not ready for changes upcoming +with SDK level 29 (Android 10). + +Everyone should move to F-Droid version, if possible. Check out [Backing +up Termux](Backing_up_Termux) if you are interested on how to +preserve data when re-installing the application. + +## About the issue + +Github discussion: + +If Termux application was built with target SDK level "29" or higher, it +will be eligible for SELinux restriction of execve() system call on data +files. That makes impossible to run package executables such as "apt", +"bash" and others located in the application's writable directory such +as \$PREFIX. + +We have chosen to stick with target SDK level \<= 28 in order to keep +Termux running on Android devices with Android OS version 10 and higher +until we release next major version of Termux (v1.0). It will change app +design to comply with new SELinux configuration and Google Play policy, +potentially at cost of user experience. \ No newline at end of file diff --git a/docs/en/Text_Editors.md b/docs/en/Text_Editors.md new file mode 100644 index 0000000000..3bc8ce1586 --- /dev/null +++ b/docs/en/Text_Editors.md @@ -0,0 +1,136 @@ +A system or program that allows a user to edit text. A text editor is a +type of program used for editing plain text files. + +Text editors are provided with operating systems and software +development packages, and can be used to change configuration files, +documentation files and programming language source code. + +# Codiad + +[Codiad Web IDE](https://github.com/Codiad/Codiad) Codiad is a web-based +IDE framework with a small footprint and minimal requirements. + +Codiad was built with simplicity in mind, allowing for fast, interactive +development without the massive overhead of some of the larger desktop +editors. That being said even users of IDE's such as Eclipse, NetBeans +and Aptana are finding Codiad's simplicity to be a huge benefit. While +simplicity was key, we didn't skimp on features and have a team of +dedicated developer actively adding more. + +Rnauber has created a +[script](https://gist.githubusercontent.com/rnauber/9f579d1480db4cc5a9a3c97c00c52fb9/raw/install_codiad.sh) +for installing the web-based IDE/editor codiad locally: + +![](images/Codiad.jpg) + +# Emacs + +GNU Emacs is a free, portable, extensible text editor. See +[emacstutor](emacstutor). + +Package: emacs + +Description: Extensible, customizable text editor-and more + +Homepage: + +![](images/Emacs.png) + +You can install emacs by `pkg install emacs` + +# joe + +Wordstar like text editor + +Homepage: + +![](images/Joe_text_editor.jpg) + +# jupp + +user friendly full screen text editor + +Homepage: + +# Micro + +Micro is a terminal-based text editor that aims to be easy to use and +intuitive, while also taking advantage of the full capabilities of +modern terminals. It comes as one single, batteries-included, static +binary with no dependencies. + +As the name indicates, micro aims to be somewhat of a successor to the +nano editor by being easy to install and use in a pinch, but micro also +aims to be enjoyable to use full time, whether you work in the terminal +because you prefer it (like me), or because you need to (over ssh). + +Use `pkg install micro` to install it. + +![](images/Micro.png) + +# nano + +nano is a small and friendly editor. It copies the look and feel of +Pico, but is free software, and implements several features that Pico +lacks, such as: opening multiple files, scrolling per line, undo/redo, +syntax coloring, line numbering, and soft-wrapping overlong lines. + +You can install it using `pkg install nano` + +![](images/Nano.png) + +# ne + +Easy-to-use and powerful text editor + +Homepage: + +# sed + +GNU stream text editor + +Homepage: + +# Vim + +In `vi` after `apt install vim`, or `vim` type the following `:help` ++enter/return to get started. To find more about the help system in vim +type the following `:help help` +enter/return. For FAQs about vim, key +in `:help faq`. If you want to learn how to use Vim you can tun +[vimtutor](vimtutor) at the command prompt. + +Package: vim + +Description: Vi IMproved - enhanced vi editor + +Homepage: + +![](images/Vim.png) + +You can install vim by `pkg install vim` + +## Neovim + +![](images/Joe_text_editor.jpg) + +Neovim is an extension of Vim: feature-parity and backwards +compatibility are high priorities. Neovim is a refactor, and sometimes +redactor, in the tradition of Vim (which itself derives from Stevie). It +is not a rewrite but a continuation and extension of Vim. Many clones +and derivatives exist, some very clever—but none are Vim. Neovim is +built for users who want the good parts of Vim, and more. + +Install : `$ pkg install neovim` + +Homepage: + +# zile + +![](images/GNU_Zile_start_screen.jpg) Lightweight +clone of the Emacs text editor + +Homepage: + +# See Also + +- [IDEs](IDEs) diff --git a/docs/en/Touch_Keyboard.md b/docs/en/Touch_Keyboard.md new file mode 100644 index 0000000000..0891b7ed9b --- /dev/null +++ b/docs/en/Touch_Keyboard.md @@ -0,0 +1,167 @@ +Use of keys like Alt, Ctrl, Esc is necessary for working with a +[CLI](CLI) terminal. Termux touch keyboards do not include +one. For that purpose, Termux uses the Volume down button to emulate the +Ctrl key. For example, pressing `Volume down+L` on a touch keyboard +sends the same input as pressing `Ctrl+L` on a hardware keyboard. + +The result of using Ctrl in combination with a key depends on which +program is used, but for many command line tools the following shortcuts +works: + +- **Ctrl+A** → Move cursor to the beginning of line +- **Ctrl+C** → Abort (send SIGINT to) current process +- **Ctrl+D** → Logout of a terminal session +- **Ctrl+E** → Move cursor to the end of line +- **Ctrl+K** → Delete from cursor to the end of line +- **Ctrl+U** → Delete from cursor to the beginning of line +- **Ctrl+L** → Clear the terminal +- **Ctrl+Z** → Suspend (send SIGTSTP to) current process +- **Ctrl+W** → Clear prompt before word (a word is a set of characters + after a space) +- **Ctrl+alt+C** → Open new session (only works in Hacker's Keyboard) + +The Volume up key also serves as a special key to produce certain input: + +- **Volume Up+E** → Escape key +- **Volume Up+T** → Tab key +- **Volume Up+1** → F1 (and Volume Up+2 → F2, etc) +- **Volume Up+0** → F10 +- **Volume Up+B** → Alt+B, back a word when using readline +- **Volume Up+F** → Alt+F, forward a word when using readline +- **Volume Up+X** → Alt+X +- **Volume Up+W** → Up arrow key +- **Volume Up+A** → Left arrow key +- **Volume Up+S** → Down arrow key +- **Volume Up+D** → Right arrow key +- **Volume Up+L** → \| (the pipe character) +- **Volume Up+H** → \~ (the tilde character) +- **Volume Up+U** → _ (underscore) +- **Volume Up+P** → Page Up +- **Volume Up+N** → Page Down +- **Volume Up+.** → Ctrl+\\ (SIGQUIT) +- **Volume Up+V** → Show the volume control +- **Volume Up+Q** → Show extra keys view +- **Volume Up+K** → Another variant to toggle extra keys view + +# Extra Keys Row + +Termux also has an extra keys view which allows you to extend your +current keyboard. To enable the extra keys view you have to long tap on +the keyboard button in the left drawer menu. You can also press Volume +Up+Q or Volume Up+K. + +After Termux v0.66 extra keys row became configurable through file +"\~/.termux/termux.properties". If this file does not exist, you will +need to create it. + +After editing Termux.properties file, you need to reload Termux +configuration by executing command "termux-reload-settings". + +The setting extra-keys-style can be used to choose which set of symbols +to use for the keys. Valid options are "default," "arrows-only", +"arrows-all", "all" and "none". + +`extra-keys-style = default ` + +Example configuration to enable 2-row (was in v0.65) extra keys: + +`extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN'|'ESC','/','-','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]` + +The extra-keys definition itself can also be spread over multiple lines, +if desired, by "backslash-escaping" the line feed at the end of each +line, thus: + +`extra-keys = [ \` +` ['ESC','|','/','HOME','UP','END','PGUP','DEL'], \` +` ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN','BKSP'] \` +`]` + +![](images/Extra_keys_view.png) + +## Supported keys + +Each key "entry" can be either a string (such as `'|'`, `'/'` or `'='`) +or one of the values listed below. These values are defined in +ExtraKeysView.java, and the list of values (not including possible +synonyms) is: + +- CTRL ("special key") +- ALT ("special key") +- FN ("special key") +- SHIFT ("special key") +- SCROLL +- SPACE +- ESC +- TAB +- HOME +- END +- PGUP +- PGDN +- INS +- DEL +- BKSP +- UP +- LEFT +- RIGHT +- DOWN +- ENTER +- BACKSLASH +- QUOTE +- APOSTROPHE +- F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 +- KEYBOARD (Hide the keyboard) +- DRAWER (Open app drawer) + +Each of the three "special keys" listed above should only be listed at +most ONCE in the extra-keys definition i.e. do NOT have more than one +CTRL key. Having more than one instance of any "special key" will result +in a bug whereby those keys do not function correctly. + +A note about backslash: this character has special meaning and you +shouldn't use it directly to define a key. Use 'BACKSLASH' instead, +otherwise properly escape it - `'\\\\'`. + +## Advanced extra keys configuration + +In Termux v0.95 extra keys configuration was extended with configurable +popups. Popups keys can be triggered by swiping up on the respective +keys. + +Here is a syntax for key definition with popup: + +`{key: KEY, popup: POPUP_KEY}` + +and here is a syntax for a more advanced key: + +`{key: KEY, popup: {macro: 'KEY COMBINATION', display: 'Key combo'}}` + +Example of advanced extra keys configuration: + + extra-keys = [[ \ + {key: ESC, popup: {macro: "CTRL d", display: "tmux exit"}}, \ + {key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \ + {key: ALT, popup: {macro: "CTRL f TAB", display: "tmux →"}}, \ + {key: TAB, popup: {macro: "ALT a", display: A-a}}, \ + {key: LEFT, popup: HOME}, \ + {key: DOWN, popup: PGDN}, \ + {key: UP, popup: PGUP}, \ + {key: RIGHT, popup: END}, \ + {macro: "ALT j", display: A-j, popup: {macro: "ALT g", display: A-g}}, \ + {key: KEYBOARD, popup: {macro: "CTRL d", display: exit}} \ + ]] + +# Text Input View + +Terminal emulators usually do not support the advanced features of touch +keyboards like autocorrect, prediction and swipe typing. To solve this, +Termux has a text input view. Text entered in it will get pasted to the +terminal. Because it's a native Android text input view, all touch +keyboard features will work. To access the text input view you have to +swipe the extra keys view to the left. + +![](images/Text_input_view.png) + +# See Also + +- [Hardware Keyboard](Hardware_Keyboard) +- [Hardware Mouse](Hardware_Mouse) \ No newline at end of file diff --git a/docs/en/Tutorials.md b/docs/en/Tutorials.md new file mode 100644 index 0000000000..e74f7df070 --- /dev/null +++ b/docs/en/Tutorials.md @@ -0,0 +1,10 @@ +[Emacstutor](Emacstutor) is an interactive hands-on which +will familiarize you with many things in Emacs. + +[Vimtutor](Vimtutor) is designed to describe enough of the +commands that you will be able to easily use Vim as an all-purpose +editor. + +# See Also + +- [FAQ](FAQ) \ No newline at end of file diff --git a/docs/en/User_Interface.md b/docs/en/User_Interface.md new file mode 100644 index 0000000000..ccd6946e5e --- /dev/null +++ b/docs/en/User_Interface.md @@ -0,0 +1,53 @@ +At launch Termux shows a terminal interface, whose text size can be +adjusted by pinch zooming or double tapping and pulling the content +towards or from you. + +Besides the terminal (with keyboard shortcuts explained below) there are +three additional interface elements available: A context menu, +navigation drawer and notification. + +The context menu can be shown by long pressing anywhere on the terminal. +It provides menu entries for: + +- Selecting and pasting text. +- Sharing text from the terminal to other apps (e.g. email or SMS) +- Resetting the terminal if it gets stuck. +- Hangup (exiting the current terminal session). +- Styling the terminal by selecting a font and a color scheme. +- Showing this help page. + +The navigation drawer is revealed by swiping inwards from the left part +of the screen (if you have gesture navigation enabled in Android, you +will need to hold briefly on the edge of the screen before swiping to +bring up the navigation drawer instead of going back in Android). It has +three elements: + +- A list of sessions. Clicking on a session shows it in the terminal + while long pressing allows you to specify a session title. +- A button to toggle visibility of the touch keyboard. +- A button to create new terminal sessions (long press for creating a + named session or a [fail-safe](fail-safe) one). + +The notification, available when a terminal session is running, is +available by pulling down the notification menu. Pressing the +notification leads to the most current terminal session. The +notification may also be expanded (by pinch-zooming or performing a +single-finger glide) to expose three actions: + +- Exiting all running terminal sessions. +- Use a wake lock to avoid entering sleep mode. +- Use a high performance wifi lock to maximize wifi performance. + +With a wake lock held the notification and Termux background processes +will be available even if no terminal session is running, which allows +server and other background processes to run more reliably. + +### Graphical interface (via external vncviewer) + +Termux also has fairly basic graphical user interface support based on +X11. To enable Graphical Environment support see [Graphical +Environment](Graphical_Environment) + +# See Also + +- [Touch Keyboard](Touch_Keyboard) \ No newline at end of file diff --git a/docs/en/Video_Editors.md b/docs/en/Video_Editors.md new file mode 100644 index 0000000000..00147785ab --- /dev/null +++ b/docs/en/Video_Editors.md @@ -0,0 +1,4 @@ +With video editors various Video manipulation can be done, including: +cutting, converting, splitting, joining ... + +## [ffmpeg](ffmpeg) \ No newline at end of file diff --git a/docs/en/Vimtutor.md b/docs/en/Vimtutor.md new file mode 100644 index 0000000000..335beaa891 --- /dev/null +++ b/docs/en/Vimtutor.md @@ -0,0 +1,14 @@ +![](images/Vimtutor.png) + +This tutor is designed to describe enough of the commands that you will +be able to easily use Vim as an all-purpose editor. + +The approximate time required to complete the tutor is 25-30 minutes, +depending upon how much time is spent with experimentation. + +After `apt install vim`, type `vimtutor` at the Termux command prompt ++enter/return to get started. + +# See Also + +[Tutorials](Tutorials) \ No newline at end of file diff --git a/docs/en/Weechat.md b/docs/en/Weechat.md new file mode 100644 index 0000000000..1a86ae6d10 --- /dev/null +++ b/docs/en/Weechat.md @@ -0,0 +1,32 @@ +![](images/Eamitb.png) + +WeeChat is a fast, light and extensible chat client. It runs on many +platforms like Linux, Unix, BSD, GNU Hurd, Mac OS X and Windows +(Bash/Ubuntu and Cygwin). + +WeeChat is: modular: a lightweight core with optional plugins +multi-protocols architecture (mainly IRC) extensible with C, Python, +Perl, Ruby, Lua, Tcl, Scheme and Javascript fully documented and +translated into several languages a free program released under the +GPLv3 license an active project with a large community for scripts. + +WeeChat has modules: + +weechat-lua-plugin: WeeChat Lua Plugin +weechat-perl-plugin: WeeChat Perl Plugin +weechat-python-plugin: WeeChat Python3 Plugin +weechat-ruby-plugin: WeeChat Ruby Plugin + +# Installation + +`pkg install weechat` + +Refer weechat +[guide](https://weechat.org/files/doc/stable/weechat_quickstart.en.html) +for more help + +## See also + +- [ERC](Emacs#ERC) +- [IRC](IRC) +- [Irssi](Irssi) \ No newline at end of file diff --git a/docs/en/Working_with_APKs.md b/docs/en/Working_with_APKs.md new file mode 100644 index 0000000000..247d7624a7 --- /dev/null +++ b/docs/en/Working_with_APKs.md @@ -0,0 +1,56 @@ +Have you ever wanted to build your own Android application created on a +smartphone and tablet? Now you can easily compile many selected +applications that have already been successfully built, installed and +tested in [Termux](https://github.com/termux) on device. You can copy +and paste the following into Termux in order to install +[BuildAPKs](https://github.com/BuildAPKs) on device: + + + pkg install curl + + curl -O https://raw.githubusercontent.com/BuildAPKs/buildAPKs/master/setup.buildAPKs.bash + + bash setup.buildAPKs.bash +![](images/APKsBuiltInTermux.png) + +[Scripts in these +directories](https://github.com/BuildAPKs/buildAPKs/tree/master/scripts/) +can build thousands of APKs on device with Termux in an Amazon and +Android smartphone, tablet, TV and Chromebook. You can use the BASH +scripts located +[here](https://github.com/BuildAPKs/buildAPKs/tree/master/scripts/bash/build) +to start building APKs on device. + +The +[build.github.bash](https://raw.githubusercontent.com/BuildAPKs/buildAPKs.github/master/build.github.bash) +bash script works directly with the GitHub API. To see how this script +queries the api for data you can use \` grep curl +\~/buildAPKs/build.github.bash \` once BuildAPKs is installed. This +command: + + ~/buildAPKs/build.github.bash BuildAPKs + +shall attempt to build all the Android Package Kits +[BuildAPKs](https://github.com/BuildAPKs?tab=repositories) has to offer. + +The [db.BuildAPKs repository](https://github.com/BuildAPKs/db.BuildAPKs) +assits in parsing repositories for AndroidManifest.xml files located at +GitHub. The \~/buildAPKs/opt/db/[BNAMES +file](https://github.com/BuildAPKs/db.BuildAPKs/blob/master/BNAMES) +holds built APK statistics: GitHub login, date stamp, repository +projects download size, build time, the number of AndroidManifest.xml +files found and how many APKs were successfully built on device for each +login that successfully built at least one APK on device from Github +with BuildAPKs. + +You can build Android browsers and file managers in Termux by issuing +the `build.browsers.bash` command once +[BuildAPKs](https://github.com/BuildAPKs) is installed. + +# See Also + +- [Ant](Ant) +- [Development Environments](Development_Environments) +- [Editors](Editors) +- [Gradle](Gradle) +- [IDEs](IDEs) diff --git a/docs/en/images/APKsBuiltInTermux.png b/docs/en/images/APKsBuiltInTermux.png new file mode 100644 index 0000000000..e99510495f Binary files /dev/null and b/docs/en/images/APKsBuiltInTermux.png differ diff --git a/docs/en/images/Codiad.jpg b/docs/en/images/Codiad.jpg new file mode 100644 index 0000000000..ab459e7203 Binary files /dev/null and b/docs/en/images/Codiad.jpg differ diff --git a/docs/en/images/ERCinTermux.png b/docs/en/images/ERCinTermux.png new file mode 100644 index 0000000000..9b573ed8e7 Binary files /dev/null and b/docs/en/images/ERCinTermux.png differ diff --git a/docs/en/images/Eamitb.png b/docs/en/images/Eamitb.png new file mode 100644 index 0000000000..3e2b5548c9 Binary files /dev/null and b/docs/en/images/Eamitb.png differ diff --git a/docs/en/images/Emacs.png b/docs/en/images/Emacs.png new file mode 100644 index 0000000000..6799c7dedd Binary files /dev/null and b/docs/en/images/Emacs.png differ diff --git a/docs/en/images/Extra_keys_view.png b/docs/en/images/Extra_keys_view.png new file mode 100644 index 0000000000..469b4ffa2f Binary files /dev/null and b/docs/en/images/Extra_keys_view.png differ diff --git a/docs/en/images/FX_Termux_Home.jpg b/docs/en/images/FX_Termux_Home.jpg new file mode 100644 index 0000000000..24bc40af32 Binary files /dev/null and b/docs/en/images/FX_Termux_Home.jpg differ diff --git a/docs/en/images/Fluxbox_aterm_lynx.png b/docs/en/images/Fluxbox_aterm_lynx.png new file mode 100644 index 0000000000..080f1a4aab Binary files /dev/null and b/docs/en/images/Fluxbox_aterm_lynx.png differ diff --git a/docs/en/images/GNU_Zile_start_screen.jpg b/docs/en/images/GNU_Zile_start_screen.jpg new file mode 100644 index 0000000000..4c041f23b8 Binary files /dev/null and b/docs/en/images/GNU_Zile_start_screen.jpg differ diff --git a/docs/en/images/GemServer.png b/docs/en/images/GemServer.png new file mode 100644 index 0000000000..1fa09ae198 Binary files /dev/null and b/docs/en/images/GemServer.png differ diff --git a/docs/en/images/Joe_text_editor.jpg b/docs/en/images/Joe_text_editor.jpg new file mode 100644 index 0000000000..b51cb22a41 Binary files /dev/null and b/docs/en/images/Joe_text_editor.jpg differ diff --git a/docs/en/images/Linux_executable_dynlinker_issue.png b/docs/en/images/Linux_executable_dynlinker_issue.png new file mode 100644 index 0000000000..687566f553 Binary files /dev/null and b/docs/en/images/Linux_executable_dynlinker_issue.png differ diff --git a/docs/en/images/Micro.png b/docs/en/images/Micro.png new file mode 100644 index 0000000000..67783c87c7 Binary files /dev/null and b/docs/en/images/Micro.png differ diff --git a/docs/en/images/MtPaint_Fluxbox_vncviewer.jpg b/docs/en/images/MtPaint_Fluxbox_vncviewer.jpg new file mode 100644 index 0000000000..0e95185440 Binary files /dev/null and b/docs/en/images/MtPaint_Fluxbox_vncviewer.jpg differ diff --git a/docs/en/images/Nano.png b/docs/en/images/Nano.png new file mode 100644 index 0000000000..2468fa0d93 Binary files /dev/null and b/docs/en/images/Nano.png differ diff --git a/docs/en/images/Newsticker.png b/docs/en/images/Newsticker.png new file mode 100644 index 0000000000..1dc7871b4f Binary files /dev/null and b/docs/en/images/Newsticker.png differ diff --git a/docs/en/images/Openbox_aterm_geany.png b/docs/en/images/Openbox_aterm_geany.png new file mode 100644 index 0000000000..d92d681a93 Binary files /dev/null and b/docs/en/images/Openbox_aterm_geany.png differ diff --git a/docs/en/images/ScreenshotTermux720170903.png b/docs/en/images/ScreenshotTermux720170903.png new file mode 100644 index 0000000000..babcfa0373 Binary files /dev/null and b/docs/en/images/ScreenshotTermux720170903.png differ diff --git a/docs/en/images/Skids-are-messaging-us.png b/docs/en/images/Skids-are-messaging-us.png new file mode 100644 index 0000000000..93185f25df Binary files /dev/null and b/docs/en/images/Skids-are-messaging-us.png differ diff --git a/docs/en/images/Start_failsafe_session.mp4 b/docs/en/images/Start_failsafe_session.mp4 new file mode 100644 index 0000000000..a5342dd1f1 Binary files /dev/null and b/docs/en/images/Start_failsafe_session.mp4 differ diff --git a/docs/en/images/Termux-failsafe-recover.mp4 b/docs/en/images/Termux-failsafe-recover.mp4 new file mode 100644 index 0000000000..0e8cba0046 Binary files /dev/null and b/docs/en/images/Termux-failsafe-recover.mp4 differ diff --git a/docs/en/images/Termux-is-not-for-hacking.png b/docs/en/images/Termux-is-not-for-hacking.png new file mode 100644 index 0000000000..363a7e7262 Binary files /dev/null and b/docs/en/images/Termux-is-not-for-hacking.png differ diff --git a/docs/en/images/Termux-setup-storage.png b/docs/en/images/Termux-setup-storage.png new file mode 100644 index 0000000000..5e9dbbb8f2 Binary files /dev/null and b/docs/en/images/Termux-setup-storage.png differ diff --git a/docs/en/images/Termux_XFCE.png b/docs/en/images/Termux_XFCE.png new file mode 100644 index 0000000000..91db8cd952 Binary files /dev/null and b/docs/en/images/Termux_XFCE.png differ diff --git a/docs/en/images/Termux_float.png b/docs/en/images/Termux_float.png new file mode 100644 index 0000000000..a4aa807827 Binary files /dev/null and b/docs/en/images/Termux_float.png differ diff --git a/docs/en/images/Termux_widget.png b/docs/en/images/Termux_widget.png new file mode 100644 index 0000000000..07220d7d5b Binary files /dev/null and b/docs/en/images/Termux_widget.png differ diff --git a/docs/en/images/Texlive.png b/docs/en/images/Texlive.png new file mode 100644 index 0000000000..cb1e742317 Binary files /dev/null and b/docs/en/images/Texlive.png differ diff --git a/docs/en/images/Text_input_view.png b/docs/en/images/Text_input_view.png new file mode 100644 index 0000000000..179fdbaeae Binary files /dev/null and b/docs/en/images/Text_input_view.png differ diff --git a/docs/en/images/USB-OTG.jpg b/docs/en/images/USB-OTG.jpg new file mode 100644 index 0000000000..cea206d0a4 Binary files /dev/null and b/docs/en/images/USB-OTG.jpg differ diff --git a/docs/en/images/Vim.png b/docs/en/images/Vim.png new file mode 100644 index 0000000000..5666b52ab9 Binary files /dev/null and b/docs/en/images/Vim.png differ diff --git a/docs/en/images/Vimtutor.png b/docs/en/images/Vimtutor.png new file mode 100644 index 0000000000..68165cd753 Binary files /dev/null and b/docs/en/images/Vimtutor.png differ diff --git a/docs/en/images/Vncviewer_conn_info01.jpg b/docs/en/images/Vncviewer_conn_info01.jpg new file mode 100644 index 0000000000..813c6cac73 Binary files /dev/null and b/docs/en/images/Vncviewer_conn_info01.jpg differ diff --git a/docs/en/images/Vscode_screenshot.jpg b/docs/en/images/Vscode_screenshot.jpg new file mode 100644 index 0000000000..db6f4482e0 Binary files /dev/null and b/docs/en/images/Vscode_screenshot.jpg differ diff --git a/docs/en/index.md b/docs/en/index.md index 8f0387ab79..320f90df16 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -2,12 +2,54 @@ page_ref: /docs/apps/termux/index.html --- -# Termux App Docs +## Termux Documentation - +Tips and tricks about using Termux application and its packages. -Welcome to documentation for the [Termux App]. -## +## Introduction -[Termux App]: https://github.com/termux/termux-app +Termux is an Android terminal emulator and Linux +environment application that works directly with no rooting or setup +required. A minimal base system is installed automatically, additional +packages are available using the package manager. + +[Getting started](Getting_started): Collection of informational resources for newbies. +[User Interface](User_Interface): How to use the app. +[Terminal Settings](Terminal_Settings): How to configure the app. +[Software](Software): How you can install more software. +[Hardware](Hardware): How to use an external keyboard and mouse. +[FAQ](FAQ): Frequently asked questions and answers to them. + +## [Installation](Installation) + +You can obtain Termux builds from +[F-Droid](https://f-droid.org/repository/browse/?fdid=com.termux). Do +not install it from Google Play. + +System requirements: + +- Android 5.0 - 12.0 + ([issues](https://github.com/termux/termux-packages/labels/android-12)) +- CPU: AArch64, ARM, i686, x86_64. +- At least 300 MB of disk space. + + +Please note that Termux does not support ARM devices without NEON SIMD, +for example on devices based on Nvidia Tegra 2 CPUs. + +VMOS, F1VM and similar sandbox applications are not supported. + +## Addons + +## Community + +Unable to find solution in the [FAQs](FAQ)? + +Just want to get to know us? + +Want help Termux developers and users out by contributing to the +project? + +Check out the [community pages](Community). Whether just for +fun or serious work, please join us.