The Mac Pro Really Is a Trash Can
Hey guys, this is Mac Heads 101, and today I'm going to be showing you how to replace the trash icon on your dock. I'm going to be showing you two ways to do this: one way with an app that I've already pre-made which works on 10.8 and later, and one just by modifying files in your file system, which is a little more difficult, but some of you may prefer that.
So, I'm going to show the app first. The app we made is called Trash BeOne, and you can go ahead and open it up. It'll immediately ask you to type your password because it needs to modify system files. Um, so what the app does is you basically drag in an image for when the trash has something in it, and you drag in an image for when the trash is empty. Um, if you haven't noticed on your dock, the trash can changes when you have stuff in it, so there's actually two different images that you need to worry about.
Um, and the images that you drag in have to be 256x256. Now by default, um, I have an image here of a Mac Pro and a Mac Pro with some paper in it in the top. Um, and if you're not sure why I did this, it's because the new Mac Pro, which Apple just released recently, looks very much like a black trash can, so it's kind of funny. Now, I didn't actually edit these images; someone else did that, and I found them online. But you can go ahead and, in the description, there's going to be a link to someone, um, to a blog post with these images, so I give them credit.
But anyway, uh, I'm going to show you how to use this app just with these default images for a sec. So once you have the two things dragged in, you just click "Set Trash Icon," and voila! On your dock, the trash icon has changed. And I'm going to go ahead and I can just empty my trash, and as you see now that I've emptied my trash, there's no, uh, paper in the top.
Now I'm going to go ahead and reset my trash back to the default when I open the app the first time. So I'm going to click "Restore from Backup" here. Um, now one little thing to note is I have this "Make Backup" button. You probably will never need to use this, but what that does is it replaces the backup that the app currently has of your old trash with whatever your current trash icon is. Um, so you probably don't want to do this if you have your icon set to something else because then you'll lose the old trash icon.
Uh, but anyway, this is how to use this app, and I'll just, one more for one other example, I'll show you how to use a custom image. So here I have an image; it's just a screenshot that I took earlier, and it's 256x256 pixels, which is the size it needs to be. I can drag it right into both of these, and I'm going to set both of them to the same thing because I don't really care what it looks like. And I'm going to set the trash, and you can see there it is. And I'm going to now restore it from backup, and of course, if I wanted to get my trusty Mac Pro images back in here, I can just click Mac Pro, and it sets them back to these.
Uh, Wells. All right, now I'm going to show you how to replace it using the file system. So I'm going to go ahead and quit this app. So first, we're going to press Command N to open a new Finder window. Then press Shift + Command + G, type this path right here, hit Enter, scroll down to Dock.Apppp, right-click it, show package contents, go to Contents, Resources, and then I highly suggest sorting it alphabetically.
Um, but anyway, you'll scroll down and you'll find all these files that start with the word "trash." There should be eight of them. On an older operating system, there might be four of them or even two of them; I'm not sure. Um, but basically what these are is here's the empty image, and here's a bigger empty image. The reason there's a bigger empty image as well as the regular empty images for retina display laptops is you need twice the resolution. I guess technically, it's four times the number of pixels, but I call it twice the resolution.
Anyway, there are eight files here, and you'll notice there are reflection images. It turns out that the dock actually generates reflections itself, so these images aren't actually used. But anyway, uh, you can just delete all eight of these. I would suggest backing them up first. If you don't have our app installed, I have our app; I have the app installed, and it made a backup for me, so I don't have to worry about that. But if you're not going to use the app, I suggest dragging these to your desktop instead of deleting them or something.
But I'm just going to go ahead and delete them, and I'm going to replace them in a second. So you need to replace them with images that, uh, are 256x256 and 128x128. Um, and for the Mac Pro, I'll have a link in the description, like I said, to the guy's blog who lets you download all of his Mac Pro images, and he has these four in his download. So you're going to need an at 2x, a regular, an empty at 2x, and a regular empty.
And you can just take these files, and I'm going to copy them and paste them over here. And you can then type your password, which you'll have to do. And so, as you can see, I've put these two or these four new icon files in my, uh, Dock's package contents, but I'm not done. It hasn't changed on the dock, so what I need to do now is open up an application, which you probably already knew was on your Mac but you might not have, called Terminal.
So you'll go to Spotlight; you'll probably be able to type "teer." If not, type "Terminal" all together, and then hit Enter or click it or whatever, and Terminal will pop up. And the first thing we're going to type is "killall Dock" with a capital D hit Enter. And boom! Our dock has restarted. The same thing that happened in the app should happen here.
Uh, the background will go gray for a second, and the dock will pop up or whatever. Anyway, here you can see the trash has already changed. Now the trash may not have changed after doing this, and even if it did change, it might when you reboot or something be back to the old trash icon until you delete something or undelete something.
And the reason for this is that the dock application, at least on the newest version of Mac OS 10, it caches. It saves all the images, all the icons on the dock, and then it just looks at that saved thing instead of looking back at the package contents to see the original thing that it was shipped with. So, uh, to fix this, we have to delete the cache; we have to delete the saved version that the dock makes.
Um, now my app does this automatically, but since we're not using my app, it's going to be a little more difficult. We're going to do is we're going to type "open /var/folders"—not DB—and it'll pop up, and it'll probably look something like this. I suggest using the view style I'm using right now in Finder.
Uh, there might be a couple folders here if you have a couple users on your computer, and you need to figure out which folder is for your user. It's not actually that hard; if you open one up, you might see a bunch of red minuses next to all the folders, that means it's not your user folder. In this case, 23 is my user folder, and inside of that, there's one more folder called this.
And this is a random string, or it's probably not random, but you get the idea. Um, when you open up this folder, you may already see a bunch of files here. On an older version of Mac, if you do, you're going to look for the file called "com.apple.Dock.iconcache." If you don't, which I don't, you can open up this folder called Capital C; I believe it's called Capital C because that's short for cache.
Um, and I'll scroll down now and find "com.apple.Dock.iconcache." Now you can't delete this file probably regularly through Finder because it's probably in use. So instead, what you've got to do is type "sudo rm -rf" and then drag in the file. And, um, I typed this in Terminal, by the way, in case you didn't catch that. Hit Enter, and then type your password in Terminal, and it won't show what you're typing, but it is getting what you're typing.
And now we've done that. Now we're going to type "killall Dock" again, and, uh, now I've actually replaced the icon cache, basically, with the icon cache for this new icon. So that was fairly simple. Um, not that bad, even when we're doing it manually. Now I'm going to restore my dock back to the normal one through my app just because I like the normal one more than the Mac Pro.
Uh, but there we go. So, uh, thanks for watching Mac Heads 101. Uh, I hope this video was helpful or interesting or funny. Subscribe, and goodbye!