Important
- Patched Firefox is required - Pending possible upstreaming: termux/termux-packages#22287
- Open Termux, then run these commands
pkg install x11-repo
pkg install nodejs firefox # I will attempt to upstream the patch into the firefox package that comes from this command
npm install puppeteer-core
curl -O https://gist.githubusercontent.com/robertkirkman/0c2f3426024069546ed9b7bb2f26cb99/raw/d9ce8ebd95df85584a10718f4198c746fcefe4eb/puppeteer_search_headless.js
node puppeteer_search_headless.js
cat puppeteer_faq.html
-
Open Termux and Termux:X11, then run these commands in Termux.
Note
This mode is the most stable and uses the llvmpipe software renderer for all graphics
pkg install x11-repo
pkg install nodejs firefox termux-x11-nightly xfce
npm install puppeteer-core
export TERMUX_X11_XSTARTUP="xfce4-session"
termux-x11 &
export DISPLAY=:0
curl -O https://gist.githubusercontent.com/robertkirkman/0c2f3426024069546ed9b7bb2f26cb99/raw/d9ce8ebd95df85584a10718f4198c746fcefe4eb/puppeteer_search_graphical.js
node puppeteer_search_graphical.js
- GPU acceleration for WebGL:
Note
Do this instead to get GPU acceleration with WebGL->Firefox->virglrenderer-android->OpenGL ES 3.0 other APIs besides WebGL (like normal page loading) continue to use software rendering. This mode is not as stable, it can crash, sometimes. This example does not demo the WebGL functionality, it's just the commands to enable it.
pkg install x11-repo
pkg install nodejs firefox termux-x11-nightly xfce virglrenderer-android
npm install puppeteer-core
export TERMUX_X11_XSTARTUP="xfce4-session"
termux-x11 &
virgl_test_server_android &
export DISPLAY=:0 GALLIUM_DRIVER=virpipe
curl -O https://gist.githubusercontent.com/robertkirkman/0c2f3426024069546ed9b7bb2f26cb99/raw/d9ce8ebd95df85584a10718f4198c746fcefe4eb/puppeteer_search_graphical.js
node puppeteer_search_graphical.js