Command line web browser
This commit is contained in:
parent
e406b52cb3
commit
8501c7ae30
|
@ -49,6 +49,9 @@ PROJECT_REPO="https://github.com/bashrc/${PROJECT_NAME}"
|
|||
# Contact details
|
||||
PROJECT_BITMESSAGE="BM-2cWuhmBvVdfrHhLoZTdspCkKeiTorUesSL"
|
||||
|
||||
# default search engine for command line browser
|
||||
DEFAULT_SEARCH='https://searx.laquadrature.net'
|
||||
|
||||
# Are we installing on a Beaglebone Black (BBB) or some other system?
|
||||
INSTALLING_ON_BBB="no"
|
||||
|
||||
|
@ -1063,6 +1066,9 @@ function read_configuration {
|
|||
if [[ $CONFIGURATION_FILE != "/root/${PROJECT_NAME}.cfg" ]]; then
|
||||
cp $CONFIGURATION_FILE /root/${PROJECT_NAME}.cfg
|
||||
fi
|
||||
if grep -q "DEFAULT_SEARCH" $CONFIGURATION_FILE; then
|
||||
DEFAULT_SEARCH=$(grep "DEFAULT_SEARCH" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "SEARCH_ENGINE_PASSWORD" $CONFIGURATION_FILE; then
|
||||
SEARCH_ENGINE_PASSWORD=$(grep "SEARCH_ENGINE_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
@ -4322,6 +4328,25 @@ function configure_internet_protocol {
|
|||
echo 'configure_internet_protocol' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function install_command_line_browser {
|
||||
if grep -Fxq "install_command_line_browser" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
apt-get -y install elinks
|
||||
|
||||
# set the home page
|
||||
if ! grep -q "WWW_HOME" /home/$MY_USERNAME/.bashrc; then
|
||||
if ! grep -q 'control' /home/$MY_USERNAME/.bashrc; then
|
||||
echo "export WWW_HOME=$DEFAULT_SEARCH" >> /home/$MY_USERNAME/.bashrc
|
||||
else
|
||||
sed -i "/control/i export WWW_HOME=$DEFAULT_SEARCH" /home/$MY_USERNAME/.bashrc
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'install_command_line_browser' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
|
||||
function configure_email {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
|
@ -10340,6 +10365,7 @@ configure_dns
|
|||
initial_setup
|
||||
install_tor
|
||||
resolve_dns_via_tor
|
||||
install_command_line_browser
|
||||
enable_ssh_via_onion
|
||||
check_date
|
||||
install_dynamicdns
|
||||
|
|
|
@ -559,16 +559,17 @@ function menu_top_level {
|
|||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone User Control Panel" \
|
||||
--title $"User Control Panel" \
|
||||
--radiolist $"Choose an operation:" 16 50 9 \
|
||||
--radiolist $"Choose an operation:" 17 50 10 \
|
||||
1 $"Use Email" off \
|
||||
2 $"Change Email Filtering Rules" off \
|
||||
3 $"Use Tox Chat" off \
|
||||
4 $"Use XMPP Chat" off \
|
||||
5 $"Use IRC" off \
|
||||
6 $"Your Encryption Keys" off \
|
||||
7 $"Administrator controls" off \
|
||||
8 $"Exit to the command line" off \
|
||||
9 $"Log out" on 2> $data
|
||||
6 $"Browse the Web" off \
|
||||
7 $"Your Encryption Keys" off \
|
||||
8 $"Administrator controls" off \
|
||||
9 $"Exit to the command line" off \
|
||||
10 $"Log out" on 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 1;;
|
||||
|
@ -580,10 +581,11 @@ function menu_top_level {
|
|||
3) toxic --force-tcp --SOCKS5-proxy 127.0.0.1 9050;;
|
||||
4) torify profanity;;
|
||||
5) torify irssi;;
|
||||
6) menu_encryption_keys;;
|
||||
7) menu_admin;;
|
||||
8) break;;
|
||||
9) kill -HUP `pgrep -s 0 -o`;;
|
||||
6) torify elinks;;
|
||||
7) menu_encryption_keys;;
|
||||
8) menu_admin;;
|
||||
9) break;;
|
||||
10) kill -HUP `pgrep -s 0 -o`;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue