Skip to content

Commit 123aa31

Browse files
authored
docs: mention Termux extension workarounds
1 parent 74af05d commit 123aa31

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/termux.md

+25
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,31 @@ Potential Workaround :
8787
1. Create a soft-link from the debian-fs to your folder in `/sdcard`
8888
2. Use git from termux (preferred)
8989

90+
### Many extensions including language packs fail to install
91+
92+
Issue: Android is not seen as a Linux environment but as a separate, unsupported platform, so code-server only allows [Web Extensions](https://code.visualstudio.com/api/extension-guides/web-extensions), refusing to install extensions that run on the server.
93+
Fix: None\
94+
Potential workaround :
95+
96+
You can manually download extensions as `.vsix` file and install them via `Extensions: Install from VSIX...` in the Command Palette.
97+
98+
Alternatively, you can override `process.platform` to `linux`:
99+
100+
Create a JS script that patches `process.platform`:
101+
102+
```
103+
// android-as-linux.js
104+
Object.defineProperty(process, 'platform', { get() { return 'linux' }});
105+
```
106+
107+
Then use Node's `--require` option to make sure it is loaded before `code-server` starts:
108+
109+
```sh
110+
NODE_OPTIONS="--require /path/to/android-as-linux.js" code-server
111+
```
112+
113+
⚠️ Note that Android and Linux are not 100% compatible, so use these workarounds at your own risk. Extensions that have native dependencies other than Node or interact with the OS directly might cause issues.
114+
90115
## Extra
91116

92117
### Create a new user

0 commit comments

Comments
 (0)