Created
June 21, 2026 14:45
-
-
Save randName/ee1cd36c3db0ef2dfec1f0bbb2c47a5f to your computer and use it in GitHub Desktop.
chromium cdp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| chown -R pwuser:pwuser /home/pwuser/profile | |
| apt-get update -qq && apt-get install -y -qq socat | |
| CHROME=$(find /ms-playwright -iname chrome -path '*chrome-linux*' | head -n1) | |
| su pwuser -c "'$CHROME' \ | |
| --headless=new \ | |
| --no-sandbox \ | |
| --remote-debugging-port=9223 \ | |
| --remote-allow-origins=* \ | |
| --user-data-dir=/home/pwuser/profile" & | |
| sleep 2 | |
| exec socat TCP-LISTEN:9222,fork,reuseaddr TCP:127.0.0.1:9223 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment