Where in the system files can I find the trash app?

Arcade

macrumors 6502
Original poster
Oct 1, 2012
318
109
Bronx, NY
Hello,

While I love the way Mojave looks I would like to make my system look a bit like the old os with the trash icon on the desktop instead of the dock. I don't want to move the trash out of the dock and loose it and then I won't know how to get it back to the dock.

Weird request but I wanted a Mac for soo long that I liked the black/white/grey look of the old operating systems.
 

chown33

Moderator
Staff member
Aug 9, 2009
8,378
4,364
Pumpkindale
The trash isn't a specific app. I think it's a feature of Dock.app, which manages the Dock, possibly in cooperation with Finder.app.

If you want an app on your Desktop, you could make an app using Automator, that takes things dropped on it and tells Finder to move them to Trash. An AppleScript step should let you tell Finder the desired action.

Then give that app a trashcan icon, and it should be good to go.
 
  • Like
Reactions: Arcade

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
13,595
142
Bergen, Norway
Disclaimer: I've NOT tried this on Mojave (or any recent macOS, but it did work with early versions of Mac OS X)! Be careful if you try to follow the instructions under here, and do have up-to-date backup of everything!

If you go to the Finder menu > Go > Go to Folder... (shift-cmd-G) and type in /System/Library/CoreServices/ you will find all the system stuff in macOS.

This includes the Dock.app which - as chown33 suggested - which is where the look of Trash is defined. You may right-click (ctrl-click) the Dock.app and choose Show Package Content, then navigate to Contents > Resources.

There you'll find these files, which is the trashcan (empty and full for normal and retina screens (@2x) in normal and dark mode (2)):
trashempty.png
trashempty@2x.png
trashempty2.png
trashempty2@2x.png
trashfull.png
trashfull@2x.png
trashfull2.png
trashfull2@2x.png

Theoretically (read disclaimer above) if you replace those files with other png files, named exactly the same (the "normal" files are 128 x 128 pixels and the retina ones, @2x, are 256 x 256 pixels), and then reboot (or maybe just restart the Dock by typing “killall Dock” into Terminal).
 
  • Like
Reactions: Arcade

mfram

macrumors 65816
Jan 23, 2010
1,056
138
San Diego, CA USA
Typically, all *.app files are signed. That signature covers everything in the .app folder. If you try to modify them the signature won't match and the app will stop working. In this case, since it is a system app, the system UAP likely won't let you modify it anyway. I would strongly recommend not messing with the contents of .app folders.
 
  • Like
Reactions: Arcade

Arcade

macrumors 6502
Original poster
Oct 1, 2012
318
109
Bronx, NY
Thank you.

I don't want to edit to the file just to make a short cut to the desktop.
 

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
13,595
142
Bergen, Norway
Making a short-cut is easy, just open terminal and write:

ln -s ~/.Trash ~/Desktop/Trash

However, the problem is making it look like a trashcan. There seem to be something weird in Mojave which doesn't let you change the icon of aliases, with .icns files, it just works on regular folders.
 

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
13,595
142
Bergen, Norway
Been poking around and think I got it. (I got it working in Mojave. Haven't tried a reboot, but it survives restarting Finder).

Before making the link (as described above), you need to change the original Trash folder's icon:

Trash is a hidden folder (named .Trash) you can get to it by going into Finder > Go > Go to Folder... (cmd-shift-G) and go to:

~/.Trash​

This will open the .Trash folder in Finder, and using Columns View Finder > View > as Columns (cmd-3) you can chose the grayish/hidden .Trash folder and use Finder > File > Get info (cmd-I).

Now you can change the icon, with a .icns file (it might work with any square image file, but I only succeeded with an icns file.) You can make icns files from any (square) image - with dimentions 512 x 512 px (and perhaps 1024 x 1024), but if you just want the old can (like the one underneath), you can download an icns file from here.

To change the icon of .Trash drag the .icns file to the little folder in the top left corner of the Trash info window (NOT the tiny one in the top bar, NOR the larger one in the Preview section). Once it 'takes' all three of those should change.

NOW, you may open Terminal and type

ln -s ~/.Trash ~/Desktop/Trash​

And you should get an Alias with the right icon onto the Desktop. Every thing you drag and drop into that alias ends up in the trash.



NOTE: This approach does not make the Trash icon dynamic (you cannot see if it's empty or full). Nor does it change the Trash icon in the Dock. Doing that requires a bit more stuff, including some scripting and would in all likelyhood also violate the System Integrity Protection (csrutil) as @mfram points out. :)
 
  • Like
Reactions: Arcade

chown33

Moderator
Staff member
Aug 9, 2009
8,378
4,364
Pumpkindale
Making a short-cut is easy, just open terminal and write:

ln -s ~/.Trash ~/Desktop/Trash

However, the problem is making it look like a trashcan. There seem to be something weird in Mojave which doesn't let you change the icon of aliases, with .icns files, it just works on regular folders.
That won't work when files on external drives are dragged to the Trash.

Every volume has its own trash folder, and it's managed on a per-user basis.
 

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
13,595
142
Bergen, Norway
That won't work when files on external drives are dragged to the Trash.

Every volume has its own trash folder, and it's managed on a per-user basis.
That's a good point.

Also, there seems to be a bug with aliases in Mojave, anyway, which makes the whole approach uncertain, even for those with just one (internal) disk. :(
 

rosyapple

macrumors member
Mar 25, 2018
69
48
I wish they'd bring back Oscar.
Oh my god yes! I miss Oscar! I used to put other Sesame Street Characters as my hard drive icons to fit the theme when Oscar was still the trash can.

Now, Oscar has become one of my hard drive icons along with Abby and Elmo.
 
  • Like
Reactions: mollyc

superscape

macrumors 6502a
Feb 12, 2008
919
214
East Riding of Yorkshire, UK
If you're feeling ambitious, you could just create a small AppleScript/Automator app with something like the following code:

Code:
on open theDroppedItems
   repeat with theItem in theDroppedItems
       tell application "Finder"
           delete theItem
       end tell
   end repeat
end open
Save it as an application and change the app icon. Sadly, I have no option for getting Oscar the Grouch back...

Hope that's of some help!