getting Avahi devices to show up in Finder with a customized icon

Discussion in 'macOS' started by markmacrumors, Apr 20, 2010.

  1. markmacrumors macrumors newbie

    Joined:
    Jun 17, 2009
    #1
    Our device is broadcasting out its model name "DeviceX" on the network:

    <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
    <name replace-wildcards="yes">%h</name>
    <service>
    <type>_afpovertcp._tcp</type>
    <port>548</port>
    </service>
    <service>
    <type>_device-info._tcp</type>
    <port>0</port>
    <txt-record>model=DeviceX</txt-record>
    </service>
    </service-group>

    According to this thread http://forums.macrumors.com/showthread.php?t=458047, on my Snow Leopard Mac I've copied our DeviceX icon .icns file into /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources . And then I'm supposed to add an entry into /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist to map between the DeviceX model and this icon file so this custom icon will show up for our device in Finder. But there aren't any details for how to modify Info.plist to do this. Any help would be appreciated. Thanks!

    Mark
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    Do you have Xcode installed? If you do, it comes with a tool called Property List Editor, that can modify both the newer binary plists and the older XML plists. This tool can also be used to inspect a property list file - for example, to find a section that needs editing, which sounds like what you need to do.

    Once you have the plist file open, you can peer into its structure by expanding the hierarchical levels, or collapsing them if you don't need them right now. One of the levels will contain entries for icons. This section is where your new entry goes.
     
  3. markmacrumors thread starter macrumors newbie

    Joined:
    Jun 17, 2009
    #3
    Thanks wrldwzrd89. I've heard of Property List Editor and I have it available but I haven't used it yet. I was able to dump the binary Info.plist into a text file so I could look at it: defaults read < Info.plist > Info.plist.txt

    I'm mainly interested in finding out what entry I need to put into the Info.plist file to get the custom icon for my Avahi-mounted device to appear. In my Info.plist file there aren't any entries with .icns in them. There are some text-encoded binary entries for "Icon"-- Icon = <496d6752 0000001c 00000000 5359534c 00000010 00000000 646f6375>;

    My device is using Avahi and afp. Maybe someone who has done this with afp can give me a suggestion.

    Mark
     

Share This Page