Hello, I installed searxng using git clone and installed all pip packages, but the files are meant for PC environments and aren’t suitable for Termux. Let’s take a look at some code from lib.sh:

DIST_ID=$(source /etc/os-release; echo "$ID");

This code obtains an ID from /etc/os-release. However, Termux doesn’t have this file in the / directory. Now, check out this part of the code:

case $DIST_ID-$DIST_VERS in arch-*|fedora-*|centos-7) systemctl enable nginx systemctl start nginx ;; esac

It checks for Arch, Fedora, and CentOS 7, but it never checks for Termux! Searxng uses sudo, systemctl, and service, all of which require editing the entire file just to replace systemctl with sv from “Termux-services”, and removing sudo. It’s just a waste of time. I tried simplifying the process using sed, but I failed. Here’s what I attempted:

sed -i -e 's|/usr/local/searxng|/data/data/com.termux/files/home/searxng|g;' searxng.sh

It’s also assumed that there’s a / in the directory path. I had to edit the URL in searxng.sh to match the Termux-specific directory, as creating files directly under / isn’t possible in Termux.

  • minnix@lemux.minnix.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    But searxng is a search engine you access from a web browser, why aren’t you hosting it at home and accessing it from your phone via url?

    • LemmyUser1290a@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Doesn’t traffic take longer to travel if you’re farther from the PC? We waste power for the PC because it’s not a laptop that can have a battery.

      I’ve already fully set up searxng in proot, but I’m slowly porting it to the main termux app using sed and other workarounds. There’s something called Nix on Droid;

      you can very easily install searxng on it, but it’s the old version and its just a heavily modified termux.

      • minnix@lemux.minnix.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        Traffic take longer? You’re talking about milliseconds. Also Wake On Lan has been baked into BIOS’s and Network cards for years so there’s no need to waste power. Is the issue that you just don’t have a PC? Regardless, if this is the path you want to take I think it’s a cool learning experience and I’m interested in seeing how it turns out.