[SOLVED] network printer not detected,avahi-daemon not starting on sysvinit

Forum Forums General Hardware [SOLVED] network printer not detected,avahi-daemon not starting on sysvinit

  • This topic has 16 replies, 6 voices, and was last updated Sep 18-9:41 am by wormsf.
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #116894
    Member
    wormsf

      Hello
      I have a CANNON MX530 multi function : scanner printer, connected to my local network
      When I run printer configuration, it doesn’t detect any network printer
      If I configure manually the printer, I find the driver, but printer is not located

      Additional information
      CUPS service is active
      When I run simple scan , the scanner on CANNON MX530 is detected

      • This topic was modified 2 months, 2 weeks ago by wormsf.
      • This topic was modified 2 months, 2 weeks ago by wormsf.
      • This topic was modified 2 months, 2 weeks ago by wormsf.
      Attachments:
      #116899
      Member
      PPC
        Helpful
        Up
        0
        ::

        Have ever tried, you know, searching for that printer driver, installing it and see if it works?
        I just searched on-line for your printer model and linux and found the official driver:
        http://th.canon/en/support/0100587702

        It downloads a compressed file. If you extract that file, you have a “packages” folder. Install first the “common” file for you architecture (32 or 64bits) and then the .deb for your printer.

        Note: since the driver is 10 years old, it should be included in Linux by default…

        P.

        #116918
        Moderator
        caprea
          Helpful
          Up
          0
          ::

          You might need the cups-backend-bjnp for printing over network with canon printers.

          #116948
          Member
          wormsf
            Helpful
            Up
            0
            ::

            Hello PPC
            I agree with you
            There is a library of drivers for many printers in debian linux . The one for MX530 is included and even older ones
            I have a laptop with ubuntu , so with the same library, and my printer was automatically detected

            Hello Caprea
            I have installed cups-backend-bjnp: no change, my cannon is not detected

            regards

            • This reply was modified 2 months, 2 weeks ago by wormsf.
            #116959
            Member
            abc-nix
              Helpful
              Up
              0
              ::

              Could this old post be of help?
              Installing a HP-Officejet Pro-6970 printer on Antix21

              When I run printer configuration, it doesn’t detect any network printer

              Does this not work then?

              When detecting the printer in the Print Settings app (found in AntixCC, or the menu Applications>Preferences)

              1) Print Settings App. [ Add -> Network Printer -> Find Network Printer (immediatly above this option I see the printer and select it) ].

              #116963
              Member
              Xunzi_23
                Helpful
                Up
                0
                ::

                Hi wormsf,
                maybe you can try at a lower level, first, as no info is available on your system. ensure avahi
                is installed and the avahi demon running, that should discover your printer. With runit pls use the gui
                to activate the service.
                You may need to go deeper, once you are sure avahi is running.
                Please open firefox and go to localhost:631 which will take you to your cups server page.
                Please first take a read through the help then try and find then setup your printer directly with cups.

                If you are able to get that far the gui tool will/should from then on work and allow selecting local or network
                printers.

                #116972
                Moderator
                caprea
                  Helpful
                  Up
                  0
                  ::

                  wormsf, you can always help us helping you by letting us know which version of antiX you are running e.g. with the output of
                  inxi -Fxz

                  #116994
                  Member
                  wormsf
                    Helpful
                    Up
                    0
                    ::

                    Hello
                    Caprea,
                    I have installed latest Antix23 version (23)
                    Kernel: 6.1.42-antix.1-amd64-smp arch: x86_64 bits: 64 compiler: gcc
                    v: 13.2.0 Desktop: IceWM v: 3.4.1 Distro: antiX-23_x64-full Arditi del
                    Popolo 27 August 2023 base: Debian GNU/Linux 12 (bookworm)

                    Xunzi 23
                    I already had tried configuration throw CUPS interface but without success

                    Avahi daemon 0.8-10 is well installed , but I don’t find it in the list of available services, so I can’t start

                    regards

                    • This reply was modified 2 months, 2 weeks ago by wormsf.
                    • This reply was modified 2 months, 2 weeks ago by wormsf.
                    • This reply was modified 2 months, 2 weeks ago by wormsf.
                    #117000
                    Member
                    PPC
                      Helpful
                      Up
                      0
                      ::

                      avahi seems to no longer support sysv init, as reported here: https://www.antixforum.com/forums/topic/cups-server-error-when-adding-new-printer/page/2/#113209

                      I’ll try checking out how to start it’s deamon in sysv, but if anyone else already knows how to do it, please do help out here!

                      Edit: for now I guess you can try to adapt to avahi the procedure exemplified here: http://www.cyberciti.biz/tips/linux-write-sys-v-init-script-to-start-stop-service.html

                      Edit2: you can try to start avahi manually, ex: antiX menu > Run > gksu avahi-daemon
                      …and then try to configure your printer. If that works, then it’s only a matter of figuring out the right syntax to create the script sysv requires to start and stop that process…
                      Note: this seems not to be a problem with antiX itself but with the avahi package and dropped support for the init system antiX uses, leaving our users to fend for themselves in what concerns starting that service. Their devs probably expect every Linux OS to use systemd, maybe?

                      P.

                      • This reply was modified 2 months, 2 weeks ago by PPC.
                      • This reply was modified 2 months, 2 weeks ago by PPC.
                      #117010
                      Moderator
                      caprea
                        Helpful
                        Up
                        0
                        ::

                        If you are courageous you could try the start-script from antiX21sysv

                        etc/init.d/avahi-daemon.dpkg-remove

                        #!/bin/sh
                        ### BEGIN INIT INFO
                        # Provides:          avahi avahi-daemon
                        # Required-Start:    $remote_fs dbus
                        # Required-Stop:     $remote_fs dbus
                        # Should-Start:	     $syslog
                        # Should-Stop:       $syslog
                        # Default-Start:     2 3 4 5
                        # Default-Stop:      0 1 6
                        # Short-Description: Avahi mDNS/DNS-SD Daemon
                        # Description:       Zeroconf daemon for configuring your network 
                        #                    automatically
                        ### END INIT INFO
                        PATH=/sbin:/bin:/usr/sbin:/usr/bin
                        DESC="Avahi mDNS/DNS-SD Daemon"
                        NAME="avahi-daemon"
                        DAEMON="/usr/sbin/$NAME"
                        SCRIPTNAME=/etc/init.d/$NAME
                        # Gracefully exit if the package has been removed.
                        test -x $DAEMON || exit 0
                        . /lib/lsb/init-functions
                        # Include avahi-daemon defaults if available.
                        test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon
                        DISABLE_TAG="/var/run/avahi-daemon/disabled-for-unicast-local"
                        #
                        #       Function that starts the daemon/service.
                        #
                        d_start() {
                            $DAEMON -c && return 0
                            if [ -e $DISABLE_TAG -a "$AVAHI_DAEMON_DETECT_LOCAL" != "0" ]; then
                                # Disabled because of the existance of an unicast .local domain
                                log_warning_msg "avahi-daemon disabled because there is a unicast .local domain"
                                exit 0;
                            fi;
                            $DAEMON -D
                        }
                        #
                        #       Function that stops the daemon/service.
                        #
                        d_stop() {
                            if $DAEMON -c ; then
                               $DAEMON -k
                            fi
                        }
                        #
                        #       Function that reload the config file for the daemon/service.
                        #
                        d_reload() {
                            $DAEMON -c && $DAEMON -r
                        }
                        #
                        #       Function that check the status of the daemon/service.
                        #
                        d_status() {
                            $DAEMON -c && { echo "$DESC is running"; exit 0; } || { echo "$DESC is not running"; exit 3; }
                        }
                        case "$1" in
                            start)
                                log_daemon_msg "Starting $DESC" "$NAME"
                                d_start
                                log_end_msg $?
                                ;;
                            stop)
                                log_daemon_msg "Stopping $DESC" "$NAME"
                                d_stop
                                log_end_msg $?
                                ;;
                            reload|force-reload)
                                log_daemon_msg "Reloading services for $DESC" "$NAME"
                                d_reload
                                log_end_msg $?
                                ;;
                            restart)
                                log_daemon_msg "Restarting $DESC" "$NAME"
                                d_stop
                                if [ "$?" -eq 0 ]; then
                                        d_start
                                        log_end_msg $?
                                else
                                        log_end_msg 1
                                fi
                                ;;
                            status)
                                d_status
                                ;;
                            *)
                                echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload|status}" >&2
                                exit 3
                                ;;
                        esac
                        exit 0
                        

                        sudo service avahi-daemon start

                        #117018
                        Member
                        PPC
                          Helpful
                          Up
                          0
                          ::

                          Thanks caprea- I tested that. For the avahi script to work, and sucessfully running

                          sudo service avahi-daemon start

                          I noticed that etc/init.d/avahi-daemon.dpkg-remove has to be renamed to etc/init.d/avahi-daemon

                          I did that with the command:

                          sudo cp /etc/init.d/avahi-daemon.dpkg-remove /etc/init.d/avahi-daemon

                          Then tried

                          sudo service avahi-daemon start

                          and

                          sudo service avahi-daemon status

                          The deamon was reported as running. If I run

                          sudo service avahi-daemon stop

                          then

                          sudo service avahi-daemon status

                          correctly report it as not running.

                          Edit: You can just start the deamon using the current script’s name, instead of renaming it:

                          sudo service avahi-daemon.dpkg-remove start

                          P.

                          • This reply was modified 2 months, 2 weeks ago by PPC.
                          • This reply was modified 2 months, 2 weeks ago by PPC.
                          #117022
                          Moderator
                          caprea
                            Helpful
                            Up
                            0
                            ::

                            Just tried the same thing and got the same result,I wonder how it works on antiX21 with the different name.Anyway, I couldn’t find out where the script comes from on antiX21, because during the installation of avahi-daemon it does not get installed.

                            #117052
                            Member
                            wormsf
                              Helpful
                              Up
                              0
                              ::

                              Caprea
                              Thank you for your help, I have created the script etc/init.d/avahi-daemon
                              and I could run sudo service avahi-daemon start

                              but why this script is not part of the standard distribution of AntiX ?
                              and also the link to this script in rc.5 folder ?

                              thank you all for your help

                              #117061
                              Member
                              oops
                                Helpful
                                Up
                                0
                                ::

                                … Their devs probably expect every Linux OS to use systemd, maybe?

                                P.

                                antiX and MX are Debian based … and Debian uses only systemd now. It’s the case for a lot of packages now (I have experimented the same with network-manager into MX a long time ago)

                                #117082
                                Member
                                wormsf
                                  Helpful
                                  Up
                                  0
                                  ::

                                  So why, with the latest Anitx23 64 bits version my network printer was not discovered
                                  and has been discovered when I have added avahi-daemon script under /etc/init.d ?
                                  I have another laptop with ubuntu (also based on debian) there is avahi-daemon script under /etc/init.d in the official distribution

                                Viewing 15 posts - 1 through 15 (of 17 total)
                                • You must be logged in to reply to this topic.