A privacy-respecting, hackable metasearch engine. Pronunciation: səːks
Install searx in your local system and make firefox to use it through your localhost for browsing Internet : Minimalistic installation
Initially I followed basic installation as described in https://github.com/asciimoo/searx . It includes
-
clone source:
git clone https://github.com/asciimoo/searx.git && cd searx -
install dependencies:
./manage.sh update_packages -
edit your settings.yml (set your secret_key!) ##Actuall no need, unless you host this as online for others user to access, you can give any arbitary key as described in searx/searx#1473
-
run
python searx/webapp.pyto start the application
By Default searx search is runs in your local system and available to you at localhost:8888
- Go to firefox
- Enter
localhost:8888in the search bar searxsearch engine is available as shown below and you can search the web.
But I thought of Automate the process So, I did the following
- In order to make your local
seraxas your default search engine infirefox, vist your loalsearxpage atlocalhost:8888. After that at the search bar, fintpage options>>Add Search engine. But Everytime you need to go to the directory where you have cloned and need runpython searx/webapp.pyto access your localsearxengine in firefox (or any other browser throughlocalhost:8888). Instead you can automate the process just by issuing the command in your termianl from any directory with the following script.
#!/bin/bash
bash -c "sudo lsof -t -i tcp:8888 -s tcp:listen | sudo xargs kill -KILL" #to kill the proper process on 8888 port.
bash -c "python /path_to_searx/searx/webapp.py"
Name the script as searx (or anyname) and place it in /usr/bin/ (in Debian Based systems) and assign user permissions for the script
- Then open terminal and run
searxor anynmae that you assigned for script
But If you want to make searx local engine available from at the time of system startup by default, and to avoid issuing commands to start, you the following script**
#!/bin/bash
bash -c "sudo lsof -t -i tcp:8888 -s tcp:listen | sudo xargs kill -KILL"
bash -c "python /Path_to_search/searx/searx/webapp.py" #Change the path to where your searx is cloned
./etc/init.d/searx
start() {
echo -n "Starting searx local-server : "
bash -c "sudo lsof -t -i tcp:8888 -s tcp:listen | sudo xargs kill -KILL"
bash -c "python /Path_to_searx/searx/searx/webapp.py" #Change the path to where your searx is cloned
return
}
stop() {
echo -n "Shutting down searx "
bash -c "sudo lsof -t -i tcp:8888 -s tcp:listen | sudo xargs kill -KILL"
return
}
status() {
bash -c "sudo lsof -t -i tcp:8888 -s tcp:listen"
return
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
stop
start
;;
reload)
stop
start
*)
echo "Usage: {start|stop|status|reload|restart[|probe]"
exit 1
;;
esac
### BEGIN INIT INFO
# Provides: scriptname
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
exit $?
Note: In the code change /Path_to_search/ Change the path to where your searx is cloned.
- Save the file in
/etc/init.d/assearxand - run
update-rc.d searx defaults, this will update the init.d scripts at system start level. - Restart the system, and now your
searxlocal search engine is always available atlocalhost:8888and you can directly searchfirefoxsearch bar(If you set default search engine assearxas said in(4), else you need to go tolocalhost:8888and browse the engine) for any thing.
