Yosemite Instructions:
Convert the sound you want to use to .caf using afconvert:
afconvert -f caff -d LEI16@22050 input_file output.caf
Go to
/System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/AlertTones/Modern
Since I wasn't sure just adding the new .caf file to this folder would work, I made a copy (backup) of sms_alert_note.caf and then replaced sms_alert_note.caf with the new file. Since it doesn't work at first (I think you have to somehow reload the framework), I restarted. After restarting the default "Note" sound was replaced by my own sound.
EDIT: El Capitan (dirty) solution (without disabling SIP)
First: prepare the .caf file as instructed above using afconvert
.
Reboot your Mac into recovery mode (hold cmd+R while booting). Open the Terminal from the utilities menu and type diskutil list
to get a list of the connected disks. Make a note of the name of the disk containing the boot volume
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage Macintosh HD 1.0 TB disk0s2
3: Apple_Boot Recovery HD 784.2 MB disk0s3`
/dev/disk1 (internal, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD +1.0 TB disk1
Logical Volume on disk0s2
8D6D5ACA-6AFF-4F53-9E61-2D83A2536501
Unencrypted
In this case the boot disk is disk0 containing the boot volume "Macintosh HD. Now type diskutil mountDisk disk0
to mount the disk (replace disk0 with whatever your disk name actually was).
Your startup disk should now be mounted in /Volumes/Macintosh HD
(or whatever your boot volume's name is), cd
to that location: cd /Volumes/Macintosh\ HD
and type chroot.
Now you have full access to your boot volume without having to deal with SIP.
Go to the folder where alert sounds are stored
cd /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/AlertTones/Modern
Make a backup of the original sound you want to replace (I'm replacing the default 'note' sound)
mv sms_alert_note.caf sms_alert_note.caf.bak
Copy the .caf file you created earlier to the folder:
cp /path/to/new/notification.caf ./sms_alert_note.caf
(note: simply adding a new file won't work as it won't be recognized by Messages, you'll have to replace one of the existing files)
Reboot. You will now be able to use your custom sound by selecting the name of the notification you replaced in the AlertTones/Modern folder in Messages -> Preferences -> Message Received Sound. If you replaced sms_alert_note.caf
this will be "Note (Default)".
I don't expect this to hold through system updates, but it might if the AlertTones folder is not modified.
Best Answer
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:
Step-by-step How-To:
Boot to macOS Recovery (AKA Recovery Mode) by booting|rebooting and pressing cmdR right after the startup chime
After booting is completed you'll see a window titled macOS Utilites. In the menubar open Utilities > Terminal
In the Terminal type
csrutil disable
and hit ⏎ Return/Enter to execute the commandIn the Terminal type
reboot
and hit ⏎ Return/EnterAfter rebooting to the standard macOS and logging on to a user with admin privileges, open Terminal in the folder /Applications/Utilities/
In the Terminal type
sudo mount -rw /
and hit ⏎ Return/Enter to execute the commandNow 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
To remove the original icon type:
and hit ⏎ Return/Enter
Copy the new icons with the Terminal to the Resources folder(s). Example (assuming the new Finder icon finder.png is on your desktop):
and hit ⏎ Return/Enter
Remove Dock's icon cache:
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 Terminalcsrutil enable
and ⏎ Return/Enter to execute the command. 13. In the Terminal typereboot
and hit ⏎ Return/Enter 14. Proof for the modified Finder icon in the Dock: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:
Download/prepare your pics (i.e. finder.png and finder@2x.png) e.g on your Desktop
Boot to macOS Recovery (AKA Recovery Mode) by booting|rebooting and pressing cmdR right after the startup chime
After booting is completed you'll see a window titled macOS Utilites. In the menubar open Utilities > Terminal
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):
If you are unable to navigate to the path
/Volumes/Macintosh\ HD
, make sure your disk is mounted. Follow the steps below to mount your disk.A quick & dirty bash script
iconreplacement.sh
(which can be refined) based on user3439894's alternative approach automates some tasks: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 (orsudo ...
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:
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:
So enter and replace Main_Volume_Name and user_name accordingly:
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.