Set up Avahi on Linux to advertise samba (and ssh) servers for Mac and Linux clients

By , 2012-01-30 17:18

Found this info somewhere on the Web… Don’t remember where exactly.

Anyway:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
    <name replace-wildcards="yes">%h</name>
    <service>
        <type>_smb._tcp</type>
        <port>445</port>
    </service>
    <service>
        <type>_ssh._tcp</type>
        <port>22</port>
    </service>
    <service>
        <type>_sftp-ssh._tcp</type>
        <port>22</port>
    </service>
    <service>
        <type>_device-info._tcp</type>
        <port>0</port>
        <txt-record>model=iPhone3,1</txt-record>
    </service>
</service-group>

You can change iPhone3,1 to any Mac identifier to change the icon. For example MacBook1,1 is a white MacBook or MacBookPro5,2 is an aluminum MBP.

 

Bonus info: To correctly display and have WP-Syntax highlight XML code, use

<pre lang="xml" escaped="true">

http://wordpress.org/extend/plugins/wp-syntax/other_notes/

Leave a Reply

 

Custom theme by me. Based on Panorama by Themocracy