Can you change app icons with the terminal?

Discussion in 'macOS' started by undefinedChar, Aug 8, 2019.

  1. undefinedChar macrumors newbie

    Joined:
    Aug 8, 2019
    #1
    Hi, recently I've been trying to find a way to change app icons with the terminal without luck...

    So for example Safari.app, changing the icon for the app and the directory and so on with the terminal...
    But without replacing the .icns file in the Application's Resources folder, so having an easy command to change the icon and an easy way to revert it is what am looking for...

    Is it possible and how do you do it?
    Alternatively is it possible with Python...

    Now I'd prefer if it is not using any body else's projects so something that works on any Mac, and for system apps SIP would likely have to be disabled but im fine with that...
     
  2. DeltaMac macrumors G3

    DeltaMac

    Joined:
    Jul 30, 2003
    Location:
    Delaware
    #2
    Why do that the hard way?
    Replace icons in the Get Info window:
    When you have your chosen icon, open the Get Info window, which would show your chosen icon. Click on that icon in the Get Info window, then Command-C to copy that icon.
    Get Info for the folder or file you want to change, click on the icon to select, then Command-V to paste the icon.

    Easy enough to revert a changed icon, when using the Get Info method. Just select the icon in that window, and press your delete key. The icon will revert to the original.

    You may have to disable SIP for some apps, and some apps just won't easily allow it, particularly if those are Apple's apps.
    Apple doesn't make this easy, and sometimes, even replacing the .icns file sometimes doesn't do what you hope.
     
  3. undefinedChar thread starter macrumors newbie

    Joined:
    Aug 8, 2019
    #3
    Well in my case I change them often, and also when apps update they seem to reset, but yes I knew about this method, it just wasn't what I needed, so instead Im now trying to create my own app to change icons easily...

    But yeah some Apple apps require you to give your user RW permissions to /System/ more specifically /System/Applications/ and that requires SIP to be disabled for you to be able to add set permissions...
     
  4. bogdanw macrumors regular

    bogdanw

    Joined:
    Mar 10, 2009
    #4
  5. undefinedChar thread starter macrumors newbie

    Joined:
    Aug 8, 2019
    #5
    Tried that and done that, the problem is all the apps like Music or Podcasts or any app that is technically just an iPad app ported to Mac, (Forgot what Apple calls the project) doesn't even seem to have a .icns nor a CFBundleFileIcon property in their respective plist file.

    And sometimes I have had problems with systems apps not wanting to change the icon even when the file is changed.
    But mostly the prior problem is the bigger problem, in general if there is a way to change any directory's icon, Apps are just folder with a .app extension and then have the executables inside and so on...

    So having a command being able to change the icon on an app without changing any files to maybe some attributes to apply to folder that changes the icon to somewhere else... No idea if such a thing is available on Mac but if it is that would be appreciated...
     

Share This Page

4 August 8, 2019