1
0
mirror of https://github.com/coder/code-server.git synced 2024-12-05 07:13:06 +08:00
code-server/docs/termux.md
Mr. Blogger 0e97a94acf
Replace nodejs with nodejs-lts in Termux docs (#4336)
nodejs installs v16 which is not compatible.  nodejs-lts currently uses v14.
2021-10-25 11:14:37 -05:00

2.3 KiB

Termux

Termux is a terminal application and Linux environment that you can also use to run code-server from your Android phone.

Install

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

Upgrade

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

Known Issues

The following details known issues and suggested workarounds for using code-server with Termux.

Search doesn't work

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

  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 ./vendor/modules/code-oss-dev/vscode-ripgrep/bin/rg
    

Backspace doesn't work

When using Android's on-screen keyboard, the backspace key doesn't work properly. This is a known upstream issue:

There are two workarounds.

Option 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 at this point.

Thanks to @Nefomemes for the suggestion!

Option 2: Use a Bluetooth keyboard.