Last active
November 19, 2019 17:06
-
-
Save dragonman225/17236e86233ea6bd49e1c96d2e0aa185 to your computer and use it in GitHub Desktop.
Start Chromium / Chrome with a new, clean profile independent of the default one.
This file contains 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 | |
EXT_BROWSERPLUS="/mnt/data/Sync/Web/Projects/BrowserPlus" | |
SESSION_DIR="${HOME}/Downloads/chrm-session" | |
if [ -z "$1" ] || [ -z "$2" ]; | |
then | |
echo "Usage: start-chrm.sh {URL} {Session_Name}" | |
else | |
OPT_EXT="--load-extension=${EXT_BROWSERPLUS}" | |
OPT_USRDATA="--user-data-dir=${SESSION_DIR}/$2" | |
zenity --question --text="Do you want to use proxy ?" --ok-label="Yes" --cancel-label="No" | |
ANS=$? | |
if [ "$ANS" -eq 0 ]; then | |
PROXY_ADDR=`zenity --entry --title "Proxy Setup" --text "Please input proxy address:" --entry-text="socks5://localhost:9000"` | |
OPT_PROXY="--proxy-server=${PROXY_ADDR}" | |
chromium $1 $OPT_EXT $OPT_USRDATA $OPT_PROXY | |
else | |
chromium $1 $OPT_EXT $OPT_USRDATA | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment