LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-04-2014, 02:57 AM   #1
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,199

Rep: Reputation: 47
How to prevent avahi-daemon from starting


I am running kubuntu-13.10 which is otherwise working well. I want to stop/remove avahi-daemon and I tried command: /etc/init.d/avahi-daemon stop . However, it remains active as I see it with the command 'netstat -apute'. How can I stop it from running at startup? I do not see it in system-settings > serviceManager listed daemons. I tried to remove it but it wants to take cups etc with it and I suspect the printer will not function after that.

Thanks for your help.
 
Old 01-04-2014, 06:31 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
Code:
(sudo) /etc/init.d/avahi-daemon stop
if file exists would only stop the service this session

what you are looking for is a way to stop it completely?

does that mean you don't need wireless discovery or printer network discovery?

in Debian the gui package =bum can stop start ups or if you like commands install the package= sysv-rc-conf

but me thinks *buntu now use systemd?
 
Old 01-04-2014, 10:52 AM   #3
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,199

Original Poster
Rep: Reputation: 47
I want to disable avahi-daemon so that it does not start at startup. My desktop is connected through usb to a local printer+scanner and I do not need to search for printers etc on any network. I tried following but none of them work:
* sudo gedit /etc/default/avahi-daemon ; Change the line: AVAHI_DAEMON_START = 1 to: AVAHI_DAEMON_START = 0 ; Reboot your system
* /etc/init.d/avahi-daemon stop (in rc.local)
* service avahi-daemon stop (in rc.local)
* sudo update-rc.d -f avahi-daemon remove
* sudo gedit /etc/avahi/avahi-daemon.conf ; change use-ipv4=yes to: use-ipv4=no ; then: sudo /etc/init.d/avahi-daemon restart
* avahi-daemon is already unselected in rcconf application

The kubuntu 13.10 does not have systemctl command so I presume it does not have systemd.

Last edited by rng; 01-04-2014 at 11:20 AM.
 
Old 01-04-2014, 07:10 PM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
does it have packages?
bum
sysv-rc-conf
 
1 members found this post helpful.
Old 01-04-2014, 08:29 PM   #5
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,199

Original Poster
Rep: Reputation: 47
'bum' package was not installed but I installed it. It shows an avahi-daemon entry. The activate checkbox on left is not ticked. Under the 'Running' status column, there is a white bulb present (rather than '-' or black bulb). On right clicking there are 2 options: 'Activate & apply now' and 'Stop now'. I stopped it but its status remained the same and the commands 'netstat -apute' and 'ps aux | grep avahi' both show that avahi-daemon is still running.

I have not yet tried sysv-rc-conf.

Last edited by rng; 01-04-2014 at 11:06 PM.
 
Old 01-05-2014, 12:58 AM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
don't forget to run it as root or sudo
 
Old 01-05-2014, 03:28 AM   #7
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,199

Original Poster
Rep: Reputation: 47
Running bum with sudo did not make any difference. I then installed and ran with sudo the sysv-rc-conf command. Avahi-daemon is not selected for any runlevel. I stopped it with '-' key. However, avahi-daemon is still running as seen on 'netstat -apute' command.
 
Old 01-05-2014, 05:31 PM   #8
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
you do not stop it pls

you unselect it by pressing space bar where ever it appears as a check

as per attached image

then reboot to check its no longer loading for your run level (most likely level 5)
Attached Thumbnails
Click image for larger version

Name:	avi.jpg
Views:	72
Size:	80.8 KB
ID:	14408  

Last edited by aus9; 01-05-2014 at 05:32 PM.
 
Old 01-05-2014, 07:22 PM   #9
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,199

Original Poster
Rep: Reputation: 47
As I mentioned earlier, it is not checked in any runlevel (see attached screenshots). Also, cups and networking are not checked but they are all running. So all these must be getting loaded later.
Attached Thumbnails
Click image for larger version

Name:	sysv-rc-conf-page1.png
Views:	36
Size:	59.2 KB
ID:	14409   Click image for larger version

Name:	sysv-rc-conf-page2.png
Views:	27
Size:	36.4 KB
ID:	14410  
 
Old 01-05-2014, 10:23 PM   #10
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
do you have a wifi device?

rfkill might run to enable avahi-daemon

you could try booting up and running

top or htop to find the daemon is not running and then do something and it might start

lsof command might show it?
 
Old 01-06-2014, 12:36 AM   #11
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,199

Original Poster
Rep: Reputation: 47
I do not have a wifi device. 'top' command does not show avahi-daemon to be there, though it is present on 'ps aux | grep avahi', 'netstat -apute' as well as 'lsof' commands.

If I try to purge/remove avahi-daemon (that seems to be the only way to stop it), it wants to take away following packages also:
Code:
bluez-cups* cups* cups-browsed* cups-daemon* hplip* libnss-mdns* printer-driver-gutenprint* printer-driver-hpcups* printer-driver-postscript-hp* telepathy-salut*
I suspect I will not be able to use my HP PSC 1410 printer-scanner which is connected with usb to this desktop. Is there any way I can use the printer after removing above packages?
 
Old 01-06-2014, 01:28 AM   #12
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
cups-browsed uses avahi-daemon EDIT but it looks like

for the moment try removing all saned* from your runlevels using sysv-rc-conf
full reboot and report

good luck


do not delete the packages.....you can manually start a daemon when you need to scan

Last edited by aus9; 01-06-2014 at 01:31 AM.
 
Old 01-06-2014, 01:34 AM   #13
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,199

Original Poster
Rep: Reputation: 47
As shown in my attachments above, both cups and cups-brow$ are already unselected from all runlevels.
 
Old 01-06-2014, 03:44 AM   #14
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
yes I can see that thanks I editted to suggest saned
but avahi is normal to have for cups now a days...when you want it

2) Do you have a NFS share setup

3) do you have anything inside rc.local?
 
Old 01-06-2014, 03:47 AM   #15
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
just found a way thru google to see what depends on it....YMMV

Code:
deborphan -a avahi-daemon 
avahi-daemon (main/net)
      sane-utils
      libsane
      pulseaudio-module-zeroconf
      cups-daemon
      hplip
      cups
I bet when you play sound......pulseaudio wakes up and starts it
giggles
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Avahi daemon not working how it should MaexIN Linux - Server 0 11-22-2013 06:45 PM
[SOLVED] How to stop avahi-daemon from running and starting up? M$ISBS Ubuntu 2 03-24-2011 07:56 PM
avahi daemon failure rdftheonly Linux - General 2 04-18-2010 06:16 PM
(Ubuntu) Avahi-Daemon errors runneri.q Linux - Newbie 1 08-06-2008 07:18 AM
Avahi-daemon on startup OR13 Fedora 1 07-13-2006 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration