zeroconf service discovery does not work

Bug #226707 reported by Vinay Augustine
10
Affects Status Importance Assigned to Milestone
kdenetwork (Ubuntu)
Fix Released
Low
Ralph Janke

Bug Description

Binary package hint: kdenetwork

I tried to enable "Zeroconf Service Discovery" in K-Menu->System Settings->Network Settings.

Checking "Enable Zeroconf network browsing" and "Browse local network" throws a "command not found" error.

It looks like the script /usr/share/avahi/enable_avahi is missing.

OS: Ubuntu 8.04
kdenetwork: 4:3.5.9-0ubuntu1

Tags: toshiba
Revision history for this message
Ralph Janke (txwikinger) wrote :

I can confirm this problemon hardy

Changed in kdenetwork:
assignee: nobody → txwikinger
importance: Undecided → Low
status: New → Triaged
status: Triaged → In Progress
Revision history for this message
MJ Britt (mjbritt120) wrote :

Ok, this is weird!

When switching to GNOME, everything works! I can mount the 2 disk I have connected to my network and I can print to the printer.

Will not work in KDE!

I'm using Ubuntu 8.04 on a Toshiba Satellite L45

Matt

Revision history for this message
Lars Karlsson (mintlars) wrote :

I can confirm this too. This also happened to me in Kubuntu 7.10.

Revision history for this message
Peter Clark (mla-forrussia) wrote :

I stumbled across this bug today and dug around a bit. Apparently, the way that System Settings interacts with Avahi is rather broken. I'm not going to point fingers, but just read the changelog for avahi; it seems as though the left hand doesn't know what the right hand is doing, as one developer applies patches so that the control module interacts one way, while another developer changes the fundamental way that avahi checks itself, so that you get the resulting bug.

I haven't bothered to read up on the design policy, but the old enable_avahi script's way of doing things appears to have been deprecated, except someone forgot to remove the checkbox when removing the script. I found a copy of the script (for entertainment purposes, see frode.kde.no/misc/avahi-dapper/enable_avahi and frode.kde.no/misc/avahi-dapper/avahi_status (the other script that was removed)), but those don't work because, as I said, that's now deprecated.

But, we still have that annoying checkbox. So let's make it work, shall we? Of course, clicking on the checkbox doesn't make a permanent change, but it does give instructions on how to make
those changes permanent.

Script 1: /usr/share/avahi/avahi_status
#!/bin/sh -e
# This is thrown into the public domain; do as thou wilt.
# Save (as root, or via sudo) this file as /usr/share/avahi/avahi_status
# and set it as executable (sudo chmod a+x /usr/share/avahi/avahi_status)

# Simple but effective way to see if Avahi is running:
if ps ax | grep "avahi-daemon: running" | grep -v grep 1> /dev/null; then
  exit 1 # Avahi is running
else
  exit 0 # Avahi is not running
fi

Script 2: /usr/share/avahi/enable_avahi
#!/bin/sh
# This is thrown into the public domain; all copyright is disavowed; do as thou wilt.
# Save (as root, or via sudo) this file as /usr/share/avahi/enable_avahi
# and set it as executable (sudo chmod a+x /usr/share/avahi/enable_avahi)

/usr/share/avahi/avahi_status 2> /dev/null; case "$?" in
    0)
        kdialog --title "Starting Zeroconf" --msgbox "Zeroconf is started; to always start Zeroconf on login, make sure that avahi-daemon is set to start at boot in System Settings -> Advanced -> System Services" &&
        /usr/sbin/invoke-rc.d avahi-daemon start
        ;;
    1)
        kdialog --title "Starting Zeroconf" --msgbox "Zeroconf is stopped; to always prevent Zeroconf from starting on login, make sure that avahi-daemon is set to not start at boot in System Settings -> Advanced -> System Services" &&
        /usr/sbin/invoke-rc.d avahi-daemon stop
        ;;
esac

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Zeroconf is enabled by default in Kubuntu 8.10 and 9.04. (There is no config option, and the feature seems to work for the most part.)

Changed in kdenetwork:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.