1

For some reason the icon for MATLAB (R2015b) no longer shows the familiar orange matlab surface icon, but rather reverts to the generic black box with exec under OS X 10.9.5 (Mavericks). Any ideas how to get the correct icon back?

The generic icon shows with Command-Tab and in the Dock, but the correct icon is shown in Finder.

When I first installed MATLAB the first run (or few?) used the correct icon, but has since switched to the generic icon.

Any idea how to to get the nice MATLAB icon back?

1

Go to info.plist, change LSUIElement value back to 0. This will fix the dock icon. This might introduce some other issues however (I don't use matlab too extensively), so if you experience any visual glitches it might be due to modifying the plist, not matlab itself.

I don't have other machines to verify, but I believe the "issue" you describe is not specific to your machine but is true for all matlab installations on osx, due to Matlab's weird startup sequence.

The reason why the first launch displays the icon is that the first launch actually launches an activator program, not matlab itself.

Moreover, even after tampering with the lsuielement to restore the dock icon, the alt-tab icon will still be the generic black-rectangle script icon (again due to the way matlab is packaged and launches)

  • 1
    Please don't change anything in Info.plist. It wrecks the code signature and can keep apps from being opened, and it can potentially mess up the stability of the app itself. – Bob Apr 12 '17 at 13:55
  • 1
    @Bob There's nothing wrong with modifying the plist if you know what you're doing. Please stop spreading FUD and scaring people from taking control of their system. Matlab doesn't check code signature, and even if it did, that's easily bypassed with a sudo codesign -fs. Messing up stability is bullshit — info.plist is only used by the system at launch time and for file type associations, not by the app itself. – 1110101001 Apr 12 '17 at 18:58
  • @Bob also even simbl injecting and patching apps directly wouldn't mess up stability if you did it right. The method I posted in my answer does work (and the reason why it does so should be self-evident if you look up what the LSUIElement key is and look at the matlab startup script) , and in no way compromises anything. – 1110101001 Apr 12 '17 at 19:01
  • Noted. I've been writing Mac software for years and know what I'm talking about. About the code signing, I understand that the trick works with MATLAB but anything that's sandboxed absolutely will fail macOS's default signature validation if the signature is tampered with or removed. – Bob Apr 12 '17 at 20:07
  • About stability, remember it's subtle. Modifying the LSUIElement key changes the environment for the app's UI and could result in certain interface-related assumptions the app makes becoming no longer valid. That could open up the door for larger problems or even security issues in a worst-case scenario. – Bob Apr 12 '17 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .