How to get docfetcher daemon auto-starting in Kubuntu?

Discussion in 'all things UNIX' started by Iangh, Aug 12, 2019.

  1. Iangh

    Iangh Registered Member

    Joined:
    Jul 13, 2005
    Posts:
    849
    Location:
    Melbourne, Australia
    I want to use Docfetcher, http://docfetcher.sourceforge.net/en/index.html. Downloaded the package and double-clicked Docfetcher-GTK2.sh to open and it works. Double-clicked docfetcher-daemon-linux to get that working to check it indexes new files, which it does. Problem is I can't get the daemon to autostart. I thought it would be a case of simply adding it to Autostart in Kubuntu's System Settings but it doesn't start. How do I get the daemon to autostart?
     
  2. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    What is the full path and name of the daemon? If you added that to a tiny script with a "sleep" just to minimize chances of your daemon trying to run before some other requirement is fully loaded and then point to that in the Settings > Startup and Shutdown > Autostart, things may work?

    Also, does the daemon need Docfetcher itself to be running or at least in memory to work?

    This is what I use for Dropbox:

    Code:
    #! /usr/bin/env bash
    
    sleep 60s && cd /home/vasa1/.dropbox-dist/ && ./dropboxd
    My ~/.config/autostart/ is empty but the script I posted above is in /home/vasa1/.config/autostart-scripts/. The Settings GUI does that itself. I didn't have to create any autostart-related folders.
     
  3. Iangh

    Iangh Registered Member

    Joined:
    Jul 13, 2005
    Posts:
    849
    Location:
    Melbourne, Australia
    The daemon is located at file:///home/ian/Programs/DocFetcher-1.1.22/docfetcher-daemon-linux. Doc fetcher doesn't need to be running.

    Using my noob knowledge, yours sleeps for 60s, then executes dropboxd in the specified folder. Why #! /usr/bin/env bash and not #!/bin/bash?


    #!/bin/bash
    sleep 60s && cd home/ian/Programs/DocFetcher-1.1.22/ && ./docfetcher-daemon-linux

    save as "startupdaemon" in home/ian/Programs/DocFetcher-1.1.22/

    use Autostart GUI to start script on startup.

    Is this right?
     
  4. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    I keep all my scripts in ~/bin which is in my path. Just for clarity I also use the .sh suffix.

    Re. #!/bin/bash, that's fine!

    Edit: did you try recoll? It's in the repos and doesn't need Java.
     
  5. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    BTW, you could also check your PATH:

    Code:
    $ env | grep ^PATH=
    PATH=/home/vasa1/.local/bin:/home/vasa1/bin:/home/vasa1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    $
    And if you don't want the default indexer, baloo, running, run balooctl disable. That'll stop baloo from indexing anything even after reboots until you enable baloo again.
     
  6. Iangh

    Iangh Registered Member

    Joined:
    Jul 13, 2005
    Posts:
    849
    Location:
    Melbourne, Australia
    Thanks vasa1, got it working on mine! Unfortunately, went to follow the same steps on my wife's Kubuntu. Unzipped package and double-clicked docfetcher-daemon-linux and nothing happened. Her directory is strange. My folders say folder, hers say inode/directory. My file says executable, hers says application/x-exectuable. Tried running from console using ./filename and get not recognised.

    I am completely stumped. Any ideas?
     
  7. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    How are you getting that information? Is this all from the command line? If so, what are the commands and the corresponding output?
     
  8. Iangh

    Iangh Registered Member

    Joined:
    Jul 13, 2005
    Posts:
    849
    Location:
    Melbourne, Australia
    I right-click for properties in Dolphin. I even tried running the daemon using the console by navigating to the directory and ./docfetcher-daemon-linux, the result is "bash: docfetcher-daemon-linux: No such file or directory". Yet if I "dir" it correctly lists all the files, including docfetcher-daemon-linux.

    I have always been so careful to set mine and the wife's computers the same to avoid headaches - I can't fathom what I've done different
     
  9. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,215
    What are the permissions on the docfetcher folder/files if you do it from the commandline?

    ls -ld "folder name"
    ls -ltra "folder contents"

    Mrk
     
  10. Iangh

    Iangh Registered Member

    Joined:
    Jul 13, 2005
    Posts:
    849
    Location:
    Melbourne, Australia
    We can both double-click on the .sh files, but only I can execute the daemon with a double-click. I can't get wife's to execute daemon using either double-click or command-line.

    teresa@teresa-E203NA:~$ ls -ld /home/teresa/Downloads/DocFetcher-1.1.22/
    drwxrwxr-x 11 teresa teresa 4096 Aug 14 06:17 /home/teresa/Downloads/DocFetcher-1.1.22/
    teresa@teresa-E203NA:~$ ls -ltra /home/teresa/Downloads/DocFetcher-1.1.22/
    total 1012
    drwxrwxr-x 2 teresa teresa 4096 Jul 30 2018 lang
    drwxrwxr-x 2 teresa teresa 4096 Jul 30 2018 img
    drwxrwxr-x 7 teresa teresa 4096 Jul 30 2018 help
    -rwxrwxr-x 1 teresa teresa 2619 Jul 30 2018 search.py
    -rw-rw-r-- 1 teresa teresa 2077 Jul 30 2018 Readme.txt
    drwxrwxr-x 2 teresa teresa 4096 Jul 30 2018 py4j
    drwxrwxr-x 2 teresa teresa 4096 Jul 30 2018 misc
    drwxrwxr-x 3 teresa teresa 4096 Jul 30 2018 lib
    -rwxrwxr-x 1 teresa teresa 291 Jul 30 2018 DocFetcher-GTK3.sh
    -rwxrwxr-x 1 teresa teresa 310 Jul 30 2018 DocFetcher-GTK2.sh
    -rw-rw-r-- 1 teresa teresa 39424 Jul 30 2018 DocFetcher.exe
    -rw-rw-r-- 1 teresa teresa 563621 Jul 30 2018 docfetcher-daemon-windows.exe
    -rwxrwxr-x 1 teresa teresa 366089 Jul 30 2018 docfetcher-daemon-linux
    drwxrwxr-x 3 teresa teresa 4096 Jul 30 2018 DocFetcher.app
    drwxrwxr-x 2 teresa teresa 4096 Aug 13 20:24 conf
    drwxrwxr-x 2 teresa teresa 4096 Aug 13 20:24 indexes
    drwxrwxr-x 11 teresa teresa 4096 Aug 14 06:17 .
    drwxr-xr-x 3 teresa teresa 4096 Aug 14 18:04 ..
     
  11. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,215
    What happens if you run on the command line, in that folder:

    ./DocFetcher-GTK2.sh

    (or docfetcher-daemon-linux)

    Mrk
     
  12. Iangh

    Iangh Registered Member

    Joined:
    Jul 13, 2005
    Posts:
    849
    Location:
    Melbourne, Australia
    The .sh's runs by double-clicking or command-line, it's the daemon that does nothing on my wife's.

    I have put Recoll on the PCs and it's working fine. But I'm now bugged because I don't understand why my folders say folder, hers say inode/directory. My file says executable, hers says application/x-exectuable. I'm sure I did a bog-standard install on her PC as I don't know enough to do anything different.
     
  13. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    Re. your move to recoll: rather than using a snap or flatpak, I'd prefer installing Evince via apt itself. Not too many dependencies.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.