Since a couple of days I've been running a MiniDLNA media server which seems compatible to all the common DLNA/UPnP clients. In my case, the client is a Samsung UE40ES5700 SmartTV with the latest AllShare Play implementation.

The initial configuration was very comfortable: You define your media folders/shares, create a launchd service and everything works like a charm.

The only thing now that I didn't really like is that MiniDLNA comes with a hardcoded icon, which will show up in the frontend of the clients. And this is (no wonder) Linux' infamous and notorious Tux. But since I am running the server on my MacBook Pro I wanted to change that icon into an Apple logo.

Like I said above there is no configuration line to specify a path for an image in the /etc/minidlna.conf so I dug up the source code and found a C-file named icons.s directly in the root folder of the source which contains the images in hex format.

I converted the hex back to the viewable PNG, fired up Photoshop and made some Apple icons in the same dimensions of the source images. Then you just need to convert your new, customized images back into hex, format them like it is required in the icons.c (no whitespaces, group of 24 hex pairs, etc.) and compile it again. That's it:

MiniDLNA icon on Samsung SmartTV

If some of you want to do the same I created the following Gist on GitHub which includes all the needed resources and even a diff patch. Follow this instructions:

  1. Make sure you disabled the launchd daemon before you start:

    sudo launchctl unload /Library/LaunchDaemons/your.bundle.minidlna.plist
    sudo launchctl stop your.bundle.minidlna
  2. Go into a temporary directory:

    cd /tmp
  3. Grab the latest MiniDLNA source via CVS:

    cvs -z3 -d:pserver:[email protected]:/cvsroot/minidlna co -P minidlna
  4. Clone my GitHub gist -

    git clone icon-patch
  5. Change into the MiniDLNA directory:

    cd minidlna
  6. Apply the diff patch:

    patch < ../icon-patch/minidlna-apple-icon.patch
  7. Compile and install:

    ./ && ./configure && make
    sudo make install
  8. Start the daemon again:

    sudo launchctl load /Library/LaunchDaemons/your.bundle.minidlna.plist
    sudo launchctl start your.bundle.minidlna

And you are done. Reboot your DLNA/UPnP client in case the icon didn't change immediately for you.