5

I found similar question: On previous versions of macOS, it was possible to change the Finder icon in /System/Library/CoreServices/Dock.app/Contents/Resources/. However, this doesn't seem possible in Catalina anymore, even if I try disabling SIP.

Only seems to be a reference to reboot and a similar link.

Are there step by step instructions how to place the new image for Catalina systems?

  • In Catalina you can't change items in the system partition, even as root - it is read-only. – red_menace Nov 28 at 16:26
2

With all default security measures of Catalina enabled you can't change neither Finder's icon nor Dock's Finder icon without rebooting.

To overcome the involved hurdles (and re-enable them later), you have to reboot at least twice.

These are:

  1. disable SIP
  2. mount your system volume read/write (usually it's read-only)

Step-by-step How-To:

  1. Boot to macOS Recovery (AKA Recovery Mode) by booting|rebooting and pressing cmdR right after the startup chime
  2. After booting is completed you'll see a window titled macOS Utilites. In the menubar open Utilities > Terminal
  3. In the Terminal type csrutil disable and hit ⏎ Return/Enter to execute the command
  4. In the Terminal type reboot and hit ⏎ Return/Enter
  5. After rebooting to the standard macOS and logging on to a user with admin privileges, open Terminal in the folder /Applications/Utilities/
  6. In the Terminal type sudo mount -rw / and hit ⏎ Return/Enter to execute the command
  7. Now modify Dock's Finder icons: (/System/Library/CoreServices/Dock.app/Contents/Resources/finder.png and /System/Library/CoreServices/Dock.app/Contents/Resources/finder@2x.png) or Finder's Finder icons: /System/Library/CoreServices/Finder.app/Contents/Resources/Finder.icns
  8. To remove the original icon type:

    sudo rm /System/Library/CoreServices/Dock.app/Contents/Resources/finder.png 
    

    and hit ⏎ Return/Enter

  9. Copy the new icons with the Terminal to the Resources folder(s). Example (assuming the new Finder icon finder.png is on your desktop):

    sudo cp /Users/your_username/Desktop/finder.png /System/Library/CoreServices/Dock.app/Contents/Resources/
    

    and hit ⏎ Return/Enter

  10. Remove Dock's icon cache:

    sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
    

    and hit ⏎ Return/Enter

  11. Kill the Dock.app: killall Dock and hit ⏎ Return/Enter
  12. Reboot to Boot to macOS Recovery and re-enable SIP by typing in the Terminal csrutil enable and ⏎ Return/Enter to execute the command.
  13. In the Terminal type reboot and hit ⏎ Return/Enter
  14. Proof for the modified Finder icon in the Dock:

    enter image description here

After point updates (e.g. 10.15.2) the icons will be replaced probably and you have to re-do the whole icon customization.


Alternative way (kudos to user3439894) without disabling SIP and only one reboot:

  1. Download/prepare your pics (i.e. finder.png and finder@2x.png) e.g on your Desktop
  2. Boot to macOS Recovery (AKA Recovery Mode) by booting|rebooting and pressing cmdR right after the startup chime
  3. After booting is completed you'll see a window titled macOS Utilites. In the menubar open Utilities > Terminal
  4. Here I assume Macintosh HD is the name of your main volume and user_name is your user name. Replace them accordingly with the names in your setup in the commands below . In the Terminal enter (hit ⏎ Return/Enter after each line):

    cp /Volumes/Macintosh\ HD/Users/user_name/Desktop/finder.png /Volumes/Macintosh\ HD/System/Library/CoreServices/Dock.app/Contents/Resources/
    cp /Volumes/Macintosh\ HD/Users/user_name/Desktop/finder@2x.png /Volumes/Macintosh\ HD/System/Library/CoreServices/Dock.app/Contents/Resources/
    find /Volumes/Macintosh\ HD/private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
    reboot
    

A quick & dirty bash script iconreplacement.sh (which can be refined) based on user3439894's alternative approach automates some tasks:

#!/bin/bash

#Variables

DOCKRES="/Volumes/$SYSVOLNAME/System/Library/CoreServices/Dock.app/Contents/Resources/"

#Change Finder icons in Dock.app, clean Dock's icon cache and reboot to normal system

if [ ! -d "/Users/$USER" ]; then
    cp "/Volumes/$SYSVOLNAME/Users/$USR/Desktop/finder.png" "$DOCKRES"
    cp "/Volumes/$SYSVOLNAME/Users/$USR/Desktop/finder@2x.png" "$DOCKRES"
    find "/Volumes/$SYSVOLNAME/private/var/folders/" -name com.apple.dock.iconcache -exec rm {} \;
    reboot
fi

#Reboot to Recovery Mode

sudo nvram "recovery-boot-mode=unused" > /dev/null 2>&1
sudo reboot > /dev/null 2>&1

The variable DOCKRES defines the path to the Resource folder of Dock.app in Recovery Mode.

The if statement detects whether the Mac is booted to Recovery Mode. Only then the resource files will be copied to Dock.app's Resource folder, the iconcache will be deleted and the Mac reboots.

The sudo commands reboot your Mac to Recovery Mode. sudo doesn't exist in the Recovery Mode base system and executing it throws an error. In my environment this happened sometimes because reboot was too slow to kill everything (or sudo ... too fast). The error message is suppressed with ... > /dev/null 2>&1.

Move the bash script to your admin user's Desktop. The two Dock resource files (finder.png and finder@2x.png) have to reside on the same user's desktop.

To execute the bash script (save any open files and quit all apps first) and reboot to Recovery Mode enter in Terminal:

cd Desktop
./iconreplacement.sh

In Recovery Mode open the Terminal. The shell command and the script require to set the name of your main volume and the admin user. Example:

SYSVOLNAME="Macintosh HD"
USR=capatane 

So enter and replace Main_Volume_Name and user_name accordingly:

SYSVOLNAME="Main_Volume_Name"
USR=user_name
cd "/Volumes/$SYSVOLNAME/Users/$USR/Desktop/"
. ./iconreplacement.sh

The first . (dot and space) is intentional and is required to export the user definded variables (SYSVOLNAME & USR) to the shell script!

Use this script at your own risk. No responsibility is taken over for errors, omissions, interruptions, defects, delays during operation etc.

  • You do not need to disable System Integrity Protection nor make / writable and you only have to reboot once. 1. Prep your images while booted normally. 2. Reboot to macOS Recovery and using Terminal from the Utilities menu, make the necessary modifications to the file system without using the sudo command, but prefacing the normal pathnames with e.g. /Volumes/Macintosh\ HD/... where ... is the rest of the normal pathname. When done, reboot, that's it! – user3439894 Nov 28 at 18:21
  • Actually, I'd bash script the entire process from a normal boot and then run the bash script when booted from macOS Recovery. – user3439894 Nov 28 at 18:21
  • @user3439894 We were thinking about scripting this at work just last week. Do you have a github where we can knock out a framework for this? – bmike Nov 28 at 18:23
  • klanomath, to answer your now deleted comment... When booted from macOS Recovery and using Terminal, it is already a root Terminal, hence no need to use sudo and System Integrity Protection is not actually active on the e.g. Macintosh HD and changes can be made at will. From macOS Recovery, csrutil disable is applicable when next booted to normal mode. – user3439894 Nov 28 at 18:28
  • @bmike, No I do not have a GitHub page, however klanomath's answer already has the framework. – user3439894 Nov 28 at 18:33

You must log in to answer this question.

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