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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-04-2014, 02:57 AM
|
#1
|
Senior Member
Registered: Aug 2011
Posts: 1,199
Rep:
|
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.
|
|
|
01-04-2014, 06:31 AM
|
#2
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
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?
|
|
|
01-04-2014, 10:52 AM
|
#3
|
Senior Member
Registered: Aug 2011
Posts: 1,199
Original Poster
Rep:
|
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.
|
|
|
01-04-2014, 07:10 PM
|
#4
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
does it have packages?
bum
sysv-rc-conf
|
|
1 members found this post helpful.
|
01-04-2014, 08:29 PM
|
#5
|
Senior Member
Registered: Aug 2011
Posts: 1,199
Original Poster
Rep:
|
'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.
|
|
|
01-05-2014, 12:58 AM
|
#6
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
don't forget to run it as root or sudo
|
|
|
01-05-2014, 03:28 AM
|
#7
|
Senior Member
Registered: Aug 2011
Posts: 1,199
Original Poster
Rep:
|
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.
|
|
|
01-05-2014, 05:31 PM
|
#8
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
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)
Last edited by aus9; 01-05-2014 at 05:32 PM.
|
|
|
01-05-2014, 07:22 PM
|
#9
|
Senior Member
Registered: Aug 2011
Posts: 1,199
Original Poster
Rep:
|
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.
|
|
|
01-05-2014, 10:23 PM
|
#10
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
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?
|
|
|
01-06-2014, 12:36 AM
|
#11
|
Senior Member
Registered: Aug 2011
Posts: 1,199
Original Poster
Rep:
|
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?
|
|
|
01-06-2014, 01:28 AM
|
#12
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
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.
|
|
|
01-06-2014, 01:34 AM
|
#13
|
Senior Member
Registered: Aug 2011
Posts: 1,199
Original Poster
Rep:
|
As shown in my attachments above, both cups and cups-brow$ are already unselected from all runlevels.
|
|
|
01-06-2014, 03:44 AM
|
#14
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
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?
|
|
|
01-06-2014, 03:47 AM
|
#15
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
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.
|
All times are GMT -5. The time now is 07:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|