diff --git a/doc/EN/app_searx.org b/doc/EN/app_searx.org index 3a2b234c..6c1d4f18 100644 --- a/doc/EN/app_searx.org +++ b/doc/EN/app_searx.org @@ -39,7 +39,7 @@ Once it has installed go to *About* on the *Administrator control panel* and loo * Make it your default search -If you are using a Tor browser or Firefox then click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "/Freedombone Metasearch/" and you can then right click on it and make it the default search. +In a Tor browser click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "/Freedombone Metasearch/" and you can then right click on it and make it the default search. * Enabling password login diff --git a/src/freedombone-app-searx b/src/freedombone-app-searx index b14b4624..a5de0ae9 100755 --- a/src/freedombone-app-searx +++ b/src/freedombone-app-searx @@ -846,6 +846,7 @@ function remove_searx { remove_completion_param install_searx sed -i '/Search engine /d' $COMPLETION_FILE sed -i '/searx /d' $COMPLETION_FILE + update_default_search_engine } function install_searx { @@ -1011,6 +1012,8 @@ function install_searx { systemctl daemon-reload systemctl start searx.service + update_default_search_engine + SEARX_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" ${PROJECT_NAME}-pass -u $MY_USERNAME -a searx -p "$SEARX_PASSWORD" if grep -q "$MY_USERNAME:" /etc/nginx/.htpasswd; then diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index 05184c90..2376ee9d 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -534,20 +534,39 @@ function install_dynamicdns { mark_completed $FUNCNAME } +function update_default_search_engine { + if [ -f /var/lib/tor/hidden_service_searx/hostname ]; then + DEFAULT_SEARCH="http://$(cat /var/lib/tor/hidden_service_searx/hostname)" + fi + + for d in /home/*/ ; do + USERNAME=$(echo "$d" | awk -F '/' '{print $3}') + if [[ $(is_valid_user "$USERNAME") == "1" ]]; then + if ! grep -q "WWW_HOME" /home/$USERNAME/.bashrc; then + if ! grep -q 'controluser' /home/$USERNAME/.bashrc; then + if ! grep -q 'export WWW_HOME=' /home/$USERNAME/.bashrc; then + echo "export WWW_HOME=$DEFAULT_SEARCH" >> /home/$USERNAME/.bashrc + else + sed -i "s|export WWW_HOME=.*|export WWW_HOME=$DEFAULT_SEARCH|g" /home/$USERNAME/.bashrc + fi + else + if ! grep -q 'export WWW_HOME=' /home/$USERNAME/.bashrc; then + sed -i "/controluser/i export WWW_HOME=$DEFAULT_SEARCH" /home/$USERNAME/.bashrc + else + sed -i "s|export WWW_HOME=.*|export WWW_HOME=$DEFAULT_SEARCH|g" /home/$USERNAME/.bashrc + fi + fi + fi + fi + done +} + function install_command_line_browser { if [[ $(is_completed $FUNCNAME) == "1" ]]; then return fi apt-get -yq install elinks - - # set the home page - if ! grep -q "WWW_HOME" /home/$MY_USERNAME/.bashrc; then - if ! grep -q 'controluser' /home/$MY_USERNAME/.bashrc; then - echo "export WWW_HOME=$DEFAULT_SEARCH" >> /home/$MY_USERNAME/.bashrc - else - sed -i "/controluser/i export WWW_HOME=$DEFAULT_SEARCH" /home/$MY_USERNAME/.bashrc - fi - fi + update_default_search_engine mark_completed $FUNCNAME } diff --git a/website/EN/app_searx.html b/website/EN/app_searx.html index b60210d2..7b400650 100644 --- a/website/EN/app_searx.html +++ b/website/EN/app_searx.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -265,9 +265,9 @@ In terms of security both the connection between you and the server, and the out -
-

Installation

-
+
+

Installation

+

ssh into the system with:

@@ -287,18 +287,18 @@ Once it has installed go to About on the Administrator control panel
-
-

Make it your default search

-
+
+

Make it your default search

+

-If you are using a Tor browser or Firefox then click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "Freedombone Metasearch" and you can then right click on it and make it the default search. +In a Tor browser click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "Freedombone Metasearch" and you can then right click on it and make it the default search.

-
-

Enabling password login

-
+
+

Enabling password login

+

It's possible that you might not want just anyone on the interwebs to be able to use your metasearch engine. Even with the onion routing this might carry some legal risk or make you a target for denial-of-service attempts (although Tor's rate limits and the firewall will give you some defense against that).

@@ -309,9 +309,9 @@ To enable password login go to the Administrator control panel then Ap
-
-

Customization

-
+
+

Customization

+

It's also possible to customise the background image if you go to App settings then select searx.