Do I need avahi?
poma
pomidorabelisima at gmail.com
Sat Aug 3 14:46:29 UTC 2013
…
>
> Besides printer discovery,
> Client:
> /usr/lib/systemd/system/cups-browsed.service
> …
> Description=Make remote CUPS printers available locally
> After=cups.service avahi-daemon.service
> Wants=cups.service avahi-daemon.service
> …
> EOF
>
> est possible other services discovery.
>
> Service Types:
> /usr/share/avahi/service-types
> http://www.dns-sd.org/ServiceTypes.html
> man 5 avahi.service
>
> Avahi config
> Client & Server:
> /etc/nsswitch.conf
> …
> hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
> …
> EOF
>
> completed by 'nss-mdns' POSTIN scriptlet,
> uses /lib64/libnss_mdns4_minimal.so.2
> required by Avahi.
> http://0pointer.de/lennart/projects/nss-mdns/
>
> /etc/avahi/avahi-daemon.conf
> …
> [server]
> use-ipv4=yes
> use-ipv6=no
> allow-interfaces=$(firewall-cmd --list-interfaces)
> …
> EOF
> man 5 avahi-daemon.conf
>
> firewall-cmd --permanent --add-service=mdns
> firewall-cmd --reload
> systemctl unmask/enable/start avahi-daemon.service
> man 1 firewall-cmd
> man 1 systemctl
> getent hosts client/server.local
>
> e.g. NFS share discovery,
> Server:
> /etc/avahi/services/nfs-share1.service
> <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
> <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
>
> <!-- This is a custom avahi nfs service file -->
>
> <service-group>
> <name replace-wildcards="yes">NFS share1 on %h</name>
> <service>
> <type>_nfs._tcp</type>
> <port>2049</port>
> <txt-record>path=/share1-dir</txt-record>
> </service>
> </service-group>
> EOF
>
> /etc/exports
> /share1-dir client(rw,insecure,sync)
> EOF
>
> Client(NFS):
> konqueror/dolphin/krusader zeroconf:/
> driven by 'kdenetwork-kdnssd' - requires "insecure"(NFS Server)
> man 5 exports
>
> UI tools for mDNS browsing:
> avahi-browse -altv
> avahi-discover
> man 1 avahi-browse
> man 1 avahi-discover
>
To complement the group of 'avahilable' clients,
e.g. SFTP-SSH service discovery,
/etc/avahi/services/sftp-ssh.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<!-- This is a custom avahi sftp service file -->
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_sftp-ssh._tcp</type>
<port>22</port>
</service>
</service-group>
EOF
/etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
Client(SFTP):
$ nautilus [--no-desktop] dns-sd://local
$ thunar dns-sd://local
driven by 'gvfsd-dnssd' - gvfs
For convenience,
$ dconf read /org/gnome/system/dns-sd/display-local
'separate'
$HOME/.gtk-bookmarks
dns-sd://local/ ZEROCONF
poma
More information about the users
mailing list