I saw this post on Mastodon, and it got me thinking.
Are there any other hardcoded folder names in macOS? Where would I even start looking?
Well, based on what I know, every program on macOS is a directory that ends with .app
, which means all I have to do is to find Finder’s location.
That should be pretty easy!
antranigv@zvartnots:~ $ cd /System/ antranigv@zvartnots:/System $ find . -type d -name Finder.app 2>/dev/null ./Library/CoreServices/Finder.app ./Volumes/Data/System/Library/CoreServices/Finder.app
Well, that was easy to find! Don’t worry, /System/Library
is the same as /System/Volumes/Data/System/Library
, Apple has a weird way of doing mount points, and I’m not here to judge. Well, at least not today!
Next I have to dig into Finder.app
’s content, let’s see what we have.
antranigv@zvartnots:/System $ cd Library/CoreServices/Finder.app/ antranigv@zvartnots:/System/Library/CoreServices/Finder.app $ find . -type f -name 'Developer*'
Weird. Nothing at all?
I wonder what type of files we have here? I already know that I wanna see all the file types except Mach-O
.
$ find . -type f -print0 | xargs -0 -I% -L 1 file -b "%" | sort -u | grep -v 'Mach-O' ASCII text, with no line terminators Apple binary property list IFF data, AIFF audio Mac OS X Code Directory version 20100 - 203 bytes Mac OS X Code Directory version 20100 - 213 bytes Mac OS X Code Directory version 20100 - 215 bytes Mac OS X Code Directory version 20100 - 217 bytes Mac OS X Code Requirement Set - 76 bytes Mac OS X Code Requirement Set - 84 bytes Mac OS X Code Requirement Set - 88 bytes Mac OS X bill of materials (BOM) file Mac OS X icon, 114423 bytes, "ic13" type Mac OS X icon, 1162872 bytes, "ic12" type Mac OS X icon, 23712 bytes, "ic13" type Mac OS X icon, 30805 bytes, "ic13" type Mac OS X icon, 37834 bytes, "ic13" type Mac OS X icon, 72729 bytes, "ic13" type Mac OS X icon, 76602 bytes, "ic13" type XML 1.0 document text, ASCII text XML 1.0 document text, Unicode text, UTF-8 text data
Okay! we’re getting somewhere!
According to Magic file directory on FreeBSD, the filename is usually .icns
I think the rest will be easy, let’s try this again!
$ find /System/Library -type f -name 'Developer*.icns' 2>/dev/null /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/DeveloperFolderIcon.icns
Bingpot!
What else do we have there?
$ find . -type f -name '*Folder*.icns' ./UsersFolderIcon.icns ./DocumentsFolderIcon.icns ./SidebarHomeFolder.icns ./ApplicationsFolderIcon.icns ./PrivateFolderBadgeIcon.icns ./GenericFolderIcon.icns ./PicturesFolderIcon.icns ./SidebarDesktopFolder.icns ./PublicFolderIcon.icns ./SidebarGenericFolder.icns ./SystemFolderIcon.icns ./ServerApplicationsFolderIcon.icns ./LibraryFolderIcon.icns ./ReadOnlyFolderBadgeIcon.icns ./SidebarBurnFolder.icns ./OpenFolderIcon.icns ./SmartFolderIcon.icns ./BurnableFolderIcon.icns ./SidebarDownloadsFolder.icns ./SidebarMoviesFolder.icns ./SidebarPicturesFolder.icns ./UtilitiesFolder.icns ./SidebarSmartFolder.icns ./HomeFolderIcon.icns ./SidebarApplicationsFolder.icns ./MovieFolderIcon.icns ./SidebarDocumentsFolder.icns ./DropFolderBadgeIcon.icns ./DownloadsFolder.icns ./GroupFolder.icns ./SidebarUtilitiesFolder.icns ./SidebarMusicFolder.icns ./DeveloperFolderIcon.icns ./NewFolderBadgeIcon.icns ./MusicFolderIcon.icns ./DesktopFolderIcon.icns ./SitesFolderIcon.icns ./SidebarDropBoxFolder.icns
These are good! Let’s look at them!
I wrote a script that converts all these .icns
files to proper PNG
s using the iconutil
program.
#!/bin/sh for icns in *.icns; do iconutil -c iconset "${icns}" done for iconset in *.iconset; do cp "${iconset}/icon_512x512@2x.png" "${iconset}-icon_512x512@2x.png" || cp "${iconset}/icon_32x32.png" "${iconset}-icon_32x32.png" done
Here are the ones that we see basically every day!
Here are some of the exotic ones that we don’t always notice, in an alphabetical order.
The Burnable folder! Still supported even on macOS Ventura!
The Developer folder! If you don’t know where you should put your code, this is the right place for it!
The Group folder!
The Library!
The Public folder! Want to share something with your local network? Put it here!
The Server Applications Folder! Wait, what? I’ve never seen this before. If you know what this is, please leave a reply 🙂
The Sites folder! If you’re new to macOS, this is a kindly reminder that macOS ships with Apache2. Yes, and ~/Sites
is the default UserDir
, i.e. http://localhost/~yourusername
$ grep '^UserDir' /etc/apache2/extra/httpd-userdir.conf UserDir Sites
The System folder!
The User folder!
And finally… the Utilities folder which lives inside the Application folder!
As sad as it is, these are the old icons, i.e. pre-Ventura (I think). I wish if there was a way to click on a switch and change it back, since it’s all here anyway!
That’s all folks…
This Article was mentioned on lobste.rs
Server applications are the components of MacOS Server, which was discontinued last year https://support.apple.com/en-us/HT208312
The Server Applications icon seems an abstract of the OS X Server logo: https://cdn.arstechnica.net/wp-content/uploads/2013/11/Screen-Shot-2013-10-29-at-1.25.58-AM-640×380.png
Nice!
I found that if you name a folder Developer, drag it to the sidebar, then rename it to whatever, the name stays Developer in the sidebar.
Relaunching the Finder, the new name appears in the sidebar but the icon stays. That’s cool.
Tested with MacOS 12.6.3
The Server Applications Icon is probably left over from when macOS Server wasn’t the garbage app it is today.
The big icons can be cmd+c cmd+v into info panel (before pasting click icon on top). Smaller icons probably not
Not sure if everyone knows this but you can change the icon of folders very easily. So if you want to have that Developer icon for another folder, open up the Get Info for both folders (Developer and the one you want to apply the icon to), then up at the top where you see the icon, you can click and highlight it, thin you can Cmd-C copy it, and over to the new folder info, you can click and highlight the normal folder icon, then paste the developer icon over it. Enjoy your new folder icons!
You can do this for any folder or application. You can also go into the application Contents/Assets folder and swap the .icns file entirely with your own, although this will be overwritten when the app updates.
I used to use the Sites folder with iWeb back on Leopard. Good times. Funny it’s still there!
What about dark mode folders? I cannot find them anywhere for the life of me haha.