1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-30 14:08:45 +00:00
code-server-2/docs/termux.md
2021-06-23 11:26:59 -07:00

2.4 KiB

Termux

Termux

Termux is an Android terminal application and Linux environment, which can also run code-server from your phone.

Installation

  1. Install Termux from F-Droid
  2. Make sure it's up-to-date by running apt update && apt upgrade
  3. Install required packages: apt install build-essential python git nodejs yarn
  4. Install code-server: yarn global add code-server
  5. Run code-server: code-server and navigate to localhost:8080 in your browser

Upgrading

To upgrade run: yarn global upgrade code-server --latest

Known Issues

Search issue

There is a known issue with search not working on Android because it's missing bin/rg. To fix:

  1. Install ripgrep with pkg
    pkg install ripgrep
    
  2. Make a soft link using ln -s
# run this command inside the code-server directory
ln -s $PREFIX/bin/rg ./lib/vscode/node_modules/vscode-ripgrep/bin/rg

For more context, see comment.

Backspace not working

There is a known issue with the backspace key not working correctly when using the on-screen keyboard on Android. This is due to an upstream issue. Read more:

Workaround #1: Modify Keyboard Dispatch Settings

  1. Open the Command Palette
  2. Search for "Preferences: Open Settings (JSON)"
  3. Add "keyboard.dispatch": "keyCode"

The backspace button should work now. (Thanks to @Nefomemes for the suggestion! See comment)

Workaround #2: use a Bluetooth keyboard.

For more context, see issues: