Giter Club home page Giter Club logo

avahi-indicator's Introduction

avahi-indicator

avahi-indicator is an AppIndicator that shows services advertised on the network with Zeroconf/Bonjour/Avahi, written in Python. Network services show up in the Ubuntu menu bar, and you can choose a service from a dropdown menu. This will open the corresponding service (e.g., opens a web browser, a SSH shell, a SFTP connection, etc.)

screenshot

Installation

As long as an AppImage does not exist yet, the simplest way on Ubuntu is

sudo apt-get update
sudo apt-get -y install avahi-daemon python2.7 python-avahi python-dbus
wget https://raw.githubusercontent.com/probonopd/avahi-indicator/master/avahi-indicator.py
python avahi-indicator.py

TODO

Pull requests welcome!

  • Solve org.freedesktop.Avahi.TimeoutError
  • Sort list of service names in the menu, and sort list of services in the menu
  • If a service is announced on the network after avahi-indicator is already launched, then a popup notification should appear, informing about the new service. However apparently avahi-indicator does not get informed (yet) when new services appear on the network after avahi-indicator has been launched (FIXME)
  • If a menu item is selected, then we should check if the service is still responding and if it is not, remove the corresponding menu entry or trigger a complete discovery (the device might have been powered off and no longer available)
  • Handle devices going away (are they "de-published")?
  • Support actions on more services (currently the menu shows only service types for which an action is configured (e.g., http(s), ssh, sftp-ssh, smb)
  • Test on other GNOME systems than Ubuntu
  • Sort menu (by service type and name)
  • Remove services from the menu that are no longer there
  • Support multiple domains
  • Create AppImage

avahi-indicator's People

Contributors

probonopd avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

aschaeffer

avahi-indicator's Issues

Error: org.freedesktop.Avahi.TimeoutError: Timeout reached

I run into Error: org.freedesktop.Avahi.TimeoutError: Timeout reached errors. When I run avahi-browse -a -r in addition to avahi-indicator, then I get Failed to resolve service 'OpenWrt' of type '_http._tcp' in domain 'local': Timeout reached errors there too. But when I kill avahi-indicator, then run avahi-browse again, then run avahi-indicator again, then it works (for the next couple of seconds... minutes).

LIBDBUSMENU-GLIB-WARNING

uname -a
Linux ubuntu 4.2.0-35-lowlatency #40-Ubuntu SMP PREEMPT Tue Mar 15 23:25:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

avahi-indicator.py:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, GLib
avahi-indicator.py:26: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
from gi.repository import AppIndicator3 as appindicator
avahi-indicator.py:39: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
from gi.repository import Notify
Browsing domain 'local' on -1.-1 ...
Browsing for services of type '_workstation._tcp' in domain 'local' on 3.1 ...
Browsing for services of type '_workstation._tcp' in domain 'local' on 2.1 ...
Browsing for services of type '_workstation._tcp' in domain 'local' on 3.0 ...
Browsing for services of type '_workstation._tcp' in domain 'local' on 2.0 ...
Found service 'ubuntu [c4:46:19:1c:7b:e8]' of type '_workstation._tcp' in domain 'local' on 3.1.
Found service 'ubuntu [20:6a:8a:05:86:03]' of type '_workstation._tcp' in domain 'local' on 2.1.
Found service 'ubuntu [c4:46:19:1c:7b:e8]' of type '_workstation._tcp' in domain 'local' on 2.1.
Found service 'ubuntu [c4:46:19:1c:7b:e8]' of type '_workstation._tcp' in domain 'local' on 3.0.
Service data for service 'ubuntu [c4:46:19:1c:7b:e8]' of type '_workstation._tcp' in domain 'local' on 3.1:
Host ubuntu.local (fe80::c646:19ff:fe1c:7be8), port 9, TXT data: []
0.00083175 secs since launch
Found service 'ubuntu [20:6a:8a:05:86:03]' of type '_workstation._tcp' in domain 'local' on 2.0.
Service data for service 'ubuntu [20:6a:8a:05:86:03]' of type '_workstation._tcp' in domain 'local' on 2.1:
Host ubuntu.local (fe80::c646:19ff:fe1c:7be8), port 9, TXT data: []
0.0008895 secs since launch
Service data for service 'ubuntu [c4:46:19:1c:7b:e8]' of type '_workstation._tcp' in domain 'local' on 2.1:
Host ubuntu.local (fe80::c646:19ff:fe1c:7be8), port 9, TXT data: []
0.0009014 secs since launch
Service data for service 'ubuntu [c4:46:19:1c:7b:e8]' of type '_workstation._tcp' in domain 'local' on 3.0:
Host ubuntu.local (192.168.0.3), port 9, TXT data: []
0.0009095 secs since launch
Service data for service 'ubuntu [20:6a:8a:05:86:03]' of type '_workstation._tcp' in domain 'local' on 2.0:
Host ubuntu.local (192.168.0.2), port 9, TXT data: []
0.000917916666667 secs since launch
(avahi-indicator.py:7903): LIBDBUSMENU-GLIB-WARNING **: About to Show called on an item wihtout submenus. We're ignoring it.

(avahi-indicator.py:7903): LIBDBUSMENU-GLIB-WARNING **: About to Show called on an item wihtout submenus. We're ignoring it.

(avahi-indicator.py:7903): LIBDBUSMENU-GLIB-WARNING **: About to Show called on an item wihtout submenus. We're ignoring it.

(avahi-indicator.py:7903): LIBDBUSMENU-GLIB-WARNING **: About to Show called on an item wihtout submenus. We're ignoring it.

сам индикатор текстовый, надпись Avahi, меню выпадает, но без надписей, пустой листинг
не как у вас на скриншоте

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.