Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Get your Trash can on the Desktop of OS X

Get your Trash can on the Desktop of OS X
Thread Tools
MacNN Staff
Forum Regular
Join Date: Jun 2000
Status: Offline
Reply With Quote
Oct 10, 2000, 10:18 AM
 
First, I have very much enjoyed reading everyone's thoughts and experiences, as well as tips and tricks involving OS X. Its been very informative. I hope you can post this on your site so people can benefit from my experiences.

Many have complained about having the Trash can on the Dock, but not being able to put it, even an alias of it, on the Desktop.

Well, I have figured out how to do it - sorta. Well, more like, I have figured out how someone with some basic UNIX scripting experience or simple programming experience (not me) can do it.

The Trash is actually a hidden folder, located at /Users/yourusername/.Trash/ (or, a folder named ".Trash" in your own "Home" directory) and it contains all of the items in your Trash can. Each user has their own invisible .Trash folder located in their own Home directory. I will use the tilde (~) key later to refer to the Home directory, as UNIX does (For example, in any directory on any UNIX system, type "cd ~" without the quotes, and you will change directory to the Home directory of the current user).

I figured I could create an alias of that folder on my desktop, but the Finder can't see .Trash (or any other file names beginning with a period - hopefully there will be an "advanced" option to show these files in the final version), and Terminal.app can not create an Aqua/Finder/Desktop/OS 9-style alias.

You could possibly create a UNIX-style symbolic link to .Trash on your Desktop, but here comes the problem (aside from the fact that I do not know how to create a symbolic link): When you empty the Trash, your .Trash folder disappears, so if you make an alias of the .Trash folder (while in OS 9) or a symbolic link of it (in OS X's Terminal.app), and try to drop a file on the desktop alias of .Trash with the Trash empty, the alias will be broken, because the .Trash folder doesn't exist! You could drop something on the Trash can on the dock, or create a .Trash folder yourself, and then use the alias, but where's the fun in that kind of lame hack?

I created a folder called .Trash at the root level of my home directory when the trash was empty, and I was able to alias that folder (using OS 9), and drop stuff in there, and the system thought it created the folder itself as if I had dropped the items to be trashed onto the trash icon on the dock. So that's an easy but tedious hack - I don't want to have to create a new folder in my home directory every time I empty the Trash, or do what I am doing now, which I will now describe.

I am now using an alias of the Trash on my desktop by having done the following: Put something in the Trash using OS X. Booted into OS 9. Opened ResEdit and made my own .Trash folder visible. Made an alias of .Trash in my Home directory (putting it in the ~/Library/Desktop/ folder puts it on the OS 9's Desktop folder for some reason). Made .Trash invisible again. Rebooted into OS X. Moved the alias onto my desktop and gave it the Trash icon (the Full trash icon - it does not change to an empty icon when the Trash is emptied) and named it "Trash".

If you plan on doing something like what I did, be careful of these three things if you plan on emptying the Trash (I learned all three the hard way):

1) Do not have the alias of the Trash open in a Finder window when emptying the Trash or the alias will break, and you have to re-create it all over again.

2) Do not attempt to open the alias in a Finder window after emptying the Trash until you have properly trashed an item using command-delete, by dragging an item to the Trash icon on the Dock, or by creating a folder called .Trash in your home directory. If you do, the alias will be broken (even if you subsequently create a new .Trash folder or add an item to the Trash properly).

3) Do not attmpt to drag an item to the alias of .Trash in the hopes of trashing that item until you have properly Trashed something or re-created the .Trash folder in your home directory.

Ironically, after doing each of these three things, I had to start over each time, but at least I was able to re-create my .Trash folder by dragging my broken alias onto the Dock's Trash icon...

Here is how we can get our beloved Trash icon back on the Desktop where it belongs... Someone needs to write a UNIX cron script or AppleScript or something like that to constantly watch the user folder, or wait for an Empty Trash AppleEvent, and whenever the Trash is emptied, have the .Trash folder be re-created, and make sure the desktop alias is still working... This should work, as I was successfully able to do it manually as I described above, and am able to display the alias to the .Trash folder by double-clicking the alias (though it labels the alias in the Finder's popup menu as being a hidden folder called "Private").

I am also able to drop items on that icon and they show up in the Trash window, which I simultaneously am able to open (which is correctly labeled as being the Trash can in the Finder's popup menu). It is almost like having the Desktop folder open in ~/Library/Desktop/ while viewing the actual Desktop.

Don't forget that this script/application needs to actually create the alias in the first place, too. Not everyone will want to go through the rigamarole that I did to make this happen.

So, can someone do this? I know they can. Now that someone can and will, Apple will either break this, or make it so that we can choose the dock, the desktop or both, because of user demand. But in the short meanwhile, hopefully someone will create a small app that will fix this for those of us who prefer the trash can on the desktop. Just don't forget to make sure the alias has the Trash icon, and not a standard folder icon (preferably without the alias arrow, but hey - i won't complain if release 1.0 has it there).

Maybe even release 2 can remove the Trash icon from the Dock as well... The way it is supposed to be.

Keep the other tips coming...

Scott
     
rtthomas
Guest
Status:
Reply With Quote
Oct 10, 2000, 10:55 AM
 
I've always greatly disliked the trash on the desktop. You start dragging something to the trash only realize it's buried behind a bunch of windows. You have to stop dragging, unbury it and then drag again. Now Mac OS X has fixed that. What could possibly be the downside to having the trash on the dock? What is your reasoning, except "that's where it belongs"?
     
codesamurai
Guest
Status:
Reply With Quote
Oct 10, 2000, 11:00 AM
 
"hopefully there will be an "advanced" option to show these files in the final version"


defaults write com.apple.finer ShowAllFiles TRUE

I think that's the finder's defaults domain (com.apple.finer) I could be wrong..I'm doing this from memory.

[This message has been edited by codesamurai (edited 10-10-2000).]
     
bipto
Dedicated MacNNer
Join Date: Aug 1999
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Oct 10, 2000, 11:23 AM
 
What could possibly be the downside to having the trash on the dock? What is your reasoning, except "that's where it belongs"?
By puting the Trash on the Dock, Apple has created a moving target. As has been discussed ad nauseum previously, basic UI elements like the Trash should not move around on you.

Rather than listing all the Dock's shortcomings, I think I'll leave it at that...

------------------
b r i a n
e w e a s e l . n e t
     
yuhui
Junior Member
Join Date: Jan 2000
Location: Singapore
Status: Offline
Reply With Quote
Oct 10, 2000, 12:51 PM
 
Hi,

Actually, I don't have a problem with the Trash residing on the Dock, as long as it is permanently at one end of the Dock.

Like rtthomas said, I've found it a pain to drag items to the Trash in OS 9 when it was hidden under windows (until I discovered the all-powerful Cmd-Delete key combo). It would be nice to have the Trash constantly visibly, which is what OS X does by putting it on the ever-visible Dock.

By placing the Trash at the extreme right end of the Dock, any user will be able to find it by just glancing at the bottom-right corner of his/her screen. C'mon, how long does it take for someone to locate the Trash, a few milliseconds? And you're complaining about that??

A drawback with putting the Trash on the Desktop is that it can be *moved*, it doesn't stick permanently to the bottom-right corner of the screen. I work at a computer lab and have had people asking where the Trash was all because someone had moved it to another spot. OS X's Trash overcomes this by saying bluntly: "The Trash is located at the extreme right end of the Dock, and you can't move it, so everyone knows where it is!"

So I say it's good to have the Trash in the Dock, not on the Desktop. Only the die-hards want it their way. OS X is based on Darwin, and Charles Darwin was the scientist who wrote about evolution, which basically states that all things change and only the fittest survive. Die-hards, it's time to change, you can't keep living out of your mom's cellar forever.

Yuhui
     
zadak
Guest
Status:
Reply With Quote
Oct 10, 2000, 01:16 PM
 
"defaults write com.apple.finer ShowAllFiles TRUE"

where do you change that?
     
daemon
Guest
Status:
Reply With Quote
Oct 10, 2000, 01:19 PM
 
Originally posted by rtthomas:
What could possibly be the downside to having the trash on the dock? What is your reasoning, except "that's where it belongs"?
Imagine a house expanding and contracting whenever you add or remove things. I still like the old desktop. I do not have X but from reviews I can understand the pains. Atleat u can have aliases and the finder in a window is not all that bad (used OS X Server). But imagine if your kitchen trash kept on moving to new locations every time you wanted to throw something. Agreed that cmnd+delete will work. But how many have been using Macs for horses years. Loads are the new gen mac users with iMacs. Lets face it. Aqua is appropriate for fluidity but having a Trash move around is too much. Let it be a little concrete on a bank.

     
daemon
Guest
Status:
Reply With Quote
Oct 10, 2000, 01:23 PM
 
Originally posted by rtthomas:
What could possibly be the downside to having the trash on the dock? What is your reasoning, except "that's where it belongs"?
Imagine a house expanding and contracting whenever you add or remove things. I still like the old desktop. I do not have X but from reviews I can understand the pains. Atleat u can have aliases and the finder in a window is not all that bad (used OS X Server). But imagine if your kitchen trash kept on moving to new locations every time you wanted to throw something. Agreed that cmnd+delete will work. But how many have been using Macs for horses years. Loads are the new gen mac users with iMacs. Lets face it. Aqua is appropriate for fluidity but having a Trash move around is too much. Let it be a little concrete on a bank.

     
Squidgy
Junior Member
Join Date: Sep 2000
Location: Arlington, MA, USA
Status: Offline
Reply With Quote
Oct 10, 2000, 01:38 PM
 
I'd like to see 4 user-controllable options for Dock layout:
Left, Centered (present location), Right (for all you trash junkies), and Justified (fixed locations for desktop and trash, everything else spread out in the middle).

To make everyone happy, the four "layout" choices listed above would be appliable to any of the 3 base "location" options - Left side, bottom, and right side.

If this happens, we all get to have our cake and eat it too.

------------------
- Ken A.
- Ken A.
     
ShortcutToMoncton
Addicted to MacNN
Join Date: Sep 2000
Location: The Rock
Status: Offline
Reply With Quote
Oct 10, 2000, 02:21 PM
 
amen, brother.

greg



------------------
Though the day's been
really long
I still feel I'm close to
nowhere....
Mankind's only chance is to harness the power of stupid.
     
monospace
Forum Regular
Join Date: Jan 2000
Location: New York City
Status: Offline
Reply With Quote
Oct 10, 2000, 02:22 PM
 
What a crazy, ridiculous, tedious hack in order to get the Trash on the desktop...

Do you really think I'd want to run cron in order to put back an alias to an invisible file that keeps changing as I use the computer? You're out of your mind.

So Apple, in their wisdom, have decided the Tash is now in the Dock, and putting it somewhere else MAY be possible, but hardly desirable considering the amount of work.

I mean, I applaud the effort that went into your investigation, but the Trash, in the Dock, was already working just fine for me, thank you very much. Now get over your bad self.
http://www.monospace.com/
You are visitor number one.
     
monospace
Forum Regular
Join Date: Jan 2000
Location: New York City
Status: Offline
Reply With Quote
Oct 10, 2000, 02:25 PM
 
And let me add this: once you've got your Dock "loaded up", like I have (and I suspect most users have) and it's expanded all the way, the Trash really doesn't move around anymore!

So a moot point altogether.
http://www.monospace.com/
You are visitor number one.
     
pneumatic
Guest
Status:
Reply With Quote
Oct 10, 2000, 03:14 PM
 
I to have tried to implement the trash on the desktop with limited success.

But you missed somethings. .Trash is not only in the ~/ directory, it's also at the root level, and so is another directory .Trashes.

Neither the trash at the root directory nor the .trashes ever disappears, but the one in the ~/ directory does. Also, things seem to pop in and out of the .Trash and .Trashes at random. (I'm assuming .Trashes is a place the system stores trash for every user). I'm sure there is some method to it's madness, I just haven't figured it out yet.

So you see you'd have to create symbolic links to those directories too. It's not hard to make a link, I beleive the command is ml.

BTW the finder can and does display those .Trash (or any .~ directory) you just have to log in as root, then when at the desktop select "Goto folder" from the Go menu and type in the location of it.

You'll also notice if you double click the trash on the dock, the finder window lists it's location as different from what you'll find in the terminal. Some neat trickery going on there!

Keep trying, I will! Though the trash really does belong on the dock
     
Trash Hack Guy
Guest
Status:
Reply With Quote
Oct 10, 2000, 03:33 PM
 
Hi,

I am the one who originally sent in the message to the forum about getting the Trash icon on their desktop.

All I have really seen here are complaints as to why I would do this or why you should want to. Isn't the whole idea that I did it because I wanted to, and you can do it IF you want to?

When I suggested someone write a cron script or AppleScript, I didn't suggest that anyone in particular should do it just because I want a Trash can on my desktop, nor did I suggest that that's where the Trash "should" be. I merely stated that its where I prefer to have the Trash and that I have heard similar complaints from others. So I found a way for it to be done, and for someone to make a quick and dirty hack to distribute over the Internet (should anyone be so inclined) so others who prefer it that way can be happy like I am.

Prefer the Trash on the dock? Fine! I am very happy for you, and I am glad you have found peace and happiness. Don't bother using my hack, and don't even think about messing around with the hidden folders. That's completely your right. Just lke its completely my right to figure out how to put the Trash on the desktop and tell others so that the others who DO want it there can make it happen if they so choose.

Was that not obvious? Did you really think by posting my original message that I was telling you all that you had to like things my way and do things my way?

Think for yourselves, just like I did. I like troubleshooting and learning the ins and outs of the new system, and I hope I can be of assistance to others in the future who want to change the behavior of the OS, whether its the Trash can, the Dock, the Finder/Desktop, or whatever. But just because you like the new location of the Trash, don't make this a philosophical discussion about the merits of a hack like this. That's not what this is all about. Its just to help those who have stated that they dislike the "new Trash" like I do.

-Scott
     
anonymous
Guest
Status:
Reply With Quote
Oct 10, 2000, 03:43 PM
 
Originally posted by Trash Hack Guy:
When I suggested someone write a cron script or AppleScript, I didn't suggest that anyone in particular should do it just because I want a Trash can on my desktop, nor did I suggest that that's where the Trash "should" be.

Originally posted by MacNN Staff:
Maybe even release 2 can remove the Trash icon from the Dock as well... The way it is supposed to be.
     
Trash Hack Guy
Guest
Status:
Reply With Quote
Oct 10, 2000, 03:44 PM
 
To pneumatic:

On a "single user system" where you have only yourself and root to worry about, the only .Trash folder you need to worry about is the ~/.Trash folder. If you can alias or link to that, that's all you will need on your desktop to imitate the OS 9 Trash can.

Each user on a multiple user system need only worry about their own home directory's .Trash as well. I have yet to discover the significance of the other .Trash folders and the .Trashes folder, but I do know that my own little hack has worked without incident with the three limitations I posted originally.

As for the location of the actual Trash can on the Dock listed in the Finder's popup menu, yeah, there is some trickery involved there, but hey - when you design a system to work a certain way, you have a lot of control over who sees what, and Apple has done a good job of hiding things that are under the hood - including the behavior and location of the Trash can.

-Scott
     
Trash Hack Guy
Guest
Status:
Reply With Quote
Oct 10, 2000, 03:52 PM
 
Thanks, anonymous post-meister, for pointing out my inconsistencies... The original message was written under the assumption that people who read it would either say "Cool - I want the Trash back on my Desktop!" and implement the hack or say "Ah, who cares" and ignore it. I also figured that maybe, just maybe, someone could make a more permanent hack for those who cared.

I never expected a backlash or a philosophical discussion about it. Besides, those who want the Trash back on their Desktop do feel it "belongs" there, as it has always been there, and that's what we like. Is there something so wrong with that? Must we "evolve" with Apple for the sake of evolution in just the ways that Apple and Steve Jobs feel we should evolve? Are they the UI gurus of the world who should be followed like Lemmings? They tell you to think different - as long as its different in their way. I don't mind evolving and changing, but geez... must it be the way Steve says without me having my say or an ability to change things?

Remember - the people who are crazy enough to think they can change the world, are the ones who do.

-Scott
     
macboyrules
Fresh-Faced Recruit
Join Date: Oct 2000
Location: Salt Lake City, UT
Status: Offline
Reply With Quote
Oct 10, 2000, 04:05 PM
 
I applaud you for your efforts. I think the idea here everyone is forgetting is that Apple has finally given us a system we can "geek" to our hearts content! Learning HOW to do this particular hack, wether you actually DO it or not, is the beginning of a process. These simple beginnings have started most of the greatest shareware utilities out there. We need to support people who explore like this. Don't you want great shareware for OS X? Remember, it was a person just like this that hacked Airport to work, and I don't hear any complaints about that.
     
dont.wanna.tell
Forum Regular
Join Date: Oct 2000
Location: Berlin / Germany
Status: Offline
Reply With Quote
Oct 10, 2000, 04:08 PM
 
Dear Forum,

maybe I am wrong... but: wouldn�t it be real easier to do the following:

Create a programm that puts everything droped to it in the Trash in the dock?

Or have a folder on the desktop monitored by a programm or script putting everything inside in the Trash?

This programm/script may also do all the secret stuff, select which .trash to use etc?

Sorry for not being a programmer myself, and my bad english, as I�m just a young german....

Cu Martin H�cker
     
Scott_H
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
Oct 10, 2000, 04:50 PM
 
I agree with dont.wanna.tell. Sounds like the job for an AppleScript with a folder action. I feel it's best for the Finder to trash things.
     
Anonymous
Guest
Status:
Reply With Quote
Oct 10, 2000, 04:58 PM
 
Originally posted by monospace:
And let me add this: once you've got your Dock "loaded up", like I have (and I suspect most users have) and it's expanded all the way, the Trash really doesn't move around anymore!

So a moot point altogether.
Minimize a few more windows, or run a few more apps, or just put a few more apps into the Dock and your Trash icon will be about half the size and definitely in a new location. The original poster is probably used to dragging things to the Trash without really looking, so when he started using Mac OS X, he had to start actually targeting the Trash and following it around as it moves. It's very noticeable to many of us.

Glad you're happy with it the way it is. "Keep the Trash where it is" is not really the point of this thread, though.
     
todhsals
Guest
Status:
Reply With Quote
Oct 10, 2000, 04:59 PM
 
Simple Solution

Create an applescript applet called Trash & save it on the desktop as a MacOSX Applet that always stays open.

Here is the body of the applet
--------------------------------------
on activate
tell application "Desktop"
activate
end tell
end activate

on run
tell application "Desktop"
activate
end tell
end run

on open (thefiles)
tell application "Desktop"
activate
delete thefiles
end tell
end open
--------------------------------------

When you drag files/folders to the trash applet, it moves them to the real trash. Give it any icon you want. & have fun
     
dont.wanna.tell
Forum Regular
Join Date: Oct 2000
Location: Berlin / Germany
Status: Offline
Reply With Quote
Oct 10, 2000, 05:21 PM
 
Haleluja!

Yes that�s what I was thinking of!

I think I should give AppleScript another try...

Cu Martin H�cker
     
budncal
Guest
Status:
Reply With Quote
Oct 10, 2000, 06:47 PM
 
You could also attach an AppleScript to a folder, change the folder icon to the trash icon, make the script move the files dumped on it to the trash, and when double clicked, empty the trash
     
Brad Nelson
Forum Regular
Join Date: Sep 2000
Location: Washington State
Status: Offline
Reply With Quote
Oct 10, 2000, 11:44 PM
 
"OS X is based on Darwin, and Charles Darwin was the scientist who wrote about evolution, which basically states that all things change and only the fittest survive. Die-hards, it's time to change, you can't keep living out of your mom's cellar forever."

Yuhui, Darwin actually espoused the theory of natural selection. It states simply that there are variations between members of the same species and that those features that are advantageous to survival will be passed on to the next generation. This explained how species changed over time. The theory had little to due with survival of the fittest. "Fit" species are wiped out all the time. T-Rex was extremely fit but had the bad luck to exist at the time of a giant comet impact.

It's Apples survival that is at stake, not mine. They've "mutated" a new OS. Some will select it. Some will not. Hopefully a little genetic engineering will improve its ability to survive. But right now I see a comet coming.
     
eno
Banned
Join Date: Sep 2000
Location: Fightclub
Status: Offline
Reply With Quote
Oct 11, 2000, 02:07 AM
 
Aqua is appropriate for fluidity but having a Trash move around is too much. Let it be a little concrete on a bank.
I can't believe so many people are jumping around about the trash moving around in the dock. Let's get a little realistic here. At startup time the dock is about 75% of the width of the screen. After you've been running a while and launched a few apps it is probably around 100%. That's not a lot of movement, and even those figures are pretty generous. (On my PowerBook with a 13.1" TFT the trash is always within the rightmost 15% of the screen). Launch even more apps and the dock shrinks to fit the icons in, but the trash is always on the hard-right.

What an easy target! I think the people who are moaning about the moving nature of the trash are just regurgitating a view they've heard expressed elsewhere (ie on Ars Technica), and more eloquenty (ie by John Siracusa) and they just want to sound like UI experts. Give it a break! :-)
     
Erik K. Veland
Guest
Status:
Reply With Quote
Oct 11, 2000, 07:32 AM
 
The dock is about 75% of the screen width?
Don't know what resolution you use, but on my 1600x1200 res it was more like 25%

Oh yeah, and if you haven't switched to 1600x1200 on your 21" monitors yet, Mac OS X gives you the perfect opportunity...

As for the trash issue, why not have a separate dock/slap in the bottom right corner with the trash? It would be a great target because you could just "trow" your pointer down in the corner and it would never move. You could always find it and it should satisfy both the desktop-trash purist and the ones who want to always find it (no windows obscuring it...)
     
Nauscicaa
Guest
Status:
Reply With Quote
Oct 11, 2000, 09:11 AM
 
I can't believe so many people are jumping around about the trash moving around in the dock. Let's get a little realistic here. At startup time the dock is about 75% of the width of the screen. After you've been running a while and launched a few apps it is probably around 100%. That's not a lot of movement, and even those figures are pretty generous.
For people who spend a lot of time in front of their macs these percentages you mention DO matter. Even though the positions do not differ that much, the fact that you have to take an extra look to see if you 'hit' the trash, in stead of just dropping it blindly and go on with your work, that's what matters

I use my mouse as little as I can, to save movement and thus time. Even though I am probably the only guy in Europe who actually does LOVE his original iMac mouse, I use keyboard shortcuts because it's faster.
Cmd-delete is what I use to put things in the trash so I don't really care where the trash is. But I can see it does matter.



[This message has been edited by Nauscicaa (edited 10-11-2000).]
     
ShortcutToMoncton
Addicted to MacNN
Join Date: Sep 2000
Location: The Rock
Status: Offline
Reply With Quote
Oct 11, 2000, 12:52 PM
 
The T-Rex died out because of a comet?

I don't think you want to even get me STARTED on evolution vs. creation.......



greg

P.S. - I think the "fixed" dock option is the best yet - minimal movement of icons, and a set amount of screen real estate. Anyway, that's my loose change......



------------------
Though the day's been
really long
I still feel I'm close to
nowhere....
Mankind's only chance is to harness the power of stupid.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:53 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,