Ubuntu 18.10, Samba 4.8.4 smb.conf - what are the valid values for fruit:model?

6,369

There are plenty of other model strings that should work as values; I believe they are directly read from /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist.

Browsing through that file, you should be able to intuit valid values. For example, from the line

UTTypeTagSpecification = { com.apple.device-model-code = ( "Macmini", "Macmini5", "Macmini6", "Macmini7" ); };

I deduced that the proper string for the Mac Mini is Macmini (no CamelCase). MacBook should work, though. As should AppleTV, MacBook5,2, and many more appearing in the aforementioned file.

Share:
6,369
nstuyvesant
Author by

nstuyvesant

Updated on September 18, 2022

Comments

  • nstuyvesant
    nstuyvesant over 1 year

    I'm accessing a fresh install of Ubuntu 18.10 and Samba 4.8.4 from macOS clients running Mojave. When connected via SMB, I want the Finder icon to look like a Mac Mini (because that's what Ubuntu 18.10 is running on).

    In /etc/samba/smb.conf ([global] section), these values for fruit:model worked: Xserve, MacPro, iMac

    These resulted in the default icon that looks like an Apple Cinema Display: MacBook, MacMini, MacSamba, TimeCapsule, RackMac

    Saw a post recommending model names from /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist on a Mac. While there are many there, the ones I tried didn't work.

    Re: avahi-daemon, Samba 4.8.4 can set the icon for connected macOS clients without avahi-daemon running (worked for the three models above). While having avahi-daemon helps the server be perpetually visible in the Finder, I'm trying to understand only the working values for fruit:model in the smb.conf.

    Anyone have any insight?

  • nstuyvesant
    nstuyvesant almost 5 years
    Had tried several combinations from Info.plist including ones with the model number without success. That was back on 4.8.4. I understand there were fixes in 4.9. I'm now on 4.10. I ended up disabling Samba's ability to set the icon and instead did it through Avahi. That ended up being successful for me. I'm curious if you've tried some of the model names in your setup and if you were able to get Samba to use the right icon.
  • Leeron R
    Leeron R almost 5 years
    @nstuyvesant , Did some quick testing on 19.04 + 4.10. Seems to work. E.x., MacBookPro14,3: see screenshot
  • Leeron R
    Leeron R almost 5 years
    @nstuyvesant , not sure which if any of these lines affect the issue; but when sharing to Macs, always advisable to add in smb.conf: fruit:encoding = native, fruit:metadata = stream, vfs objects = catia fruit streams_xattr. If you find they improve the answer, let me know and I will edit to reflect. Cheers
  • nstuyvesant
    nstuyvesant almost 5 years
    Thanks @Leeron. Bug 13746 was corrected in 4.9.4. This was why my previous attempts on 4.8.4 didn't work. I do use some of the other settings you recommended. There's a pretty good Wiki article for Samba with macOS clients at wiki.samba.org/index.php/…. Some of the defaults have changed in newer versions so we should check if some of these are no longer needed.
  • Oleksandr
    Oleksandr over 4 years
    Just a note: to see icon/share changes in the Finder you need to restart it. Finder caches network stuff, so you'll not see any changes after modifying/restarting Samba until you restart Finder with Alt+Cmd+Esc.