Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Force a clean desktop by removing the Desktop Desktop
Want to keep your desktop clean, save for mounted drives? One way of achieving this, while keeping the benefits of having links to the Desktop function as normal, is to remove the Desktop altogether. Thanks to OS X's UNIX underpinnings, this is easy. Open a Terminal, and ... to keep what you already have on the desktop:
 mkdir realDesktop
 mv ~/Desktop/* realDesktop
And then delete the original Desktop:
 rm -r Desktop
Finally, create a symbolic link to your new Desktop folder, called realDesktop:
 ln -s realDesktop Desktop
This allows you to use your Desktop as normal from within applications, while maintaining a perfectly uncluttered view. Works well for me.

[robg adds: I believe, but have not tested the theory, that the result of this hint is that you can no longer drop something onto your desktop, thus keeping it clean. Caution: If you're going to try this, make sure you have a good backup of the items on your desktop before you begin, just in case you mess up the Terminal backup or something else goes wrong. Second, although there shouldn't be any negative repercussions of this change, you can never tell what might happen down the road. Personally, I just leave the desktop as-is, though the only things on it are a few folders and any 'hot' items that need attention...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,087 views]  

Force a clean desktop by removing the Desktop | 10 comments | Create New Account
Click here to return to the 'Force a clean desktop by removing the Desktop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
At least one mistake
Authored by: mzs on Jun 22, '04 11:30:08AM
Be careful with this hint. First-off I really cannot trust how this hint works. Possibly some operations fail due to the symlink with a silent error but others like mounting do not. But at least the mv does not do what it is intended to.

Do this command:

ls ~/Desktop/* | grep '^\.'

Now do this command:

ls -A ~/Desktop | grep '^\.'

See the difference? In shell globbing (both csh and sh type shells) * does not expand to dot files. In my listing I get a few extra files missing, and you should see at least .DS_Store and .localized missing. So when you do the mv command, any dot files you have in your Desktop folder will be lost once you delete it.

[ Reply to This | # ]

Move the whole directory
Authored by: gshenaut on Jun 22, '04 03:04:52PM
It might be better, if you want to do this, to use a sequence like
mv Desktop realDesktop
ln -s realDesktop Desktop
That way everything in Desktop gets moved, including dot files and resource forks. Also, since you are doing a rename rather than a delete, I suppose it's somewhat safer.

Greg Shenaut

[ Reply to This | # ]

oops
Authored by: mzs on Jun 22, '04 11:34:07AM
In the grep command the posting stripped-off my backslashes. It should be
grep '^\.'
for both cases.

[ Reply to This | # ]
Or use Folder Actions
Authored by: sinjin on Jun 22, '04 01:12:04PM
WARNING! Shameless plug alert!

You can keep your desktop sparkling clean without altering anything in the system using OS X's built in "Folder Actions." Check out this hint of mine for details. And yes, that is a joke in the second paragraph ;-). The short version of the hint is to attach this folder action script to the Desktop folder:


on adding folder items to this_folder after receiving added_items
  repeat with each_item in added_items
    tell application "Finder"
      move each_item to "Path:to:new:folder:" replacing no
    end tell
  end repeat
end adding folder items to
Replace "Path:to:new:folder:" with the actual path name you will be using. After that everything that you send to the Desktop or drop on it gets redirected to the folder you specified in the path.

[ Reply to This | # ]
Or use Folder Actions
Authored by: wgscott on Jun 22, '04 01:48:35PM

That's one of the best hints I have seen posted here (somehow I missed it the first time around). Ironic there are so many boneheads that can't comprehend self-depricating humor.

Buy this guy a drink!



[ Reply to This | # ]
Or use Folder Actions
Authored by: mrchaotica on Jun 25, '04 09:44:16PM

Hey, thanks! I'd been approximating this behavior with a cron job:

$ crontab -l
0 1 * * * mv ~/Desktop/* ~/tmp/TO\ BE\ FILED/

(note: the command activates only once per day, at 1AM)

But this is much better, since it uses system events rather than polling.



[ Reply to This | # ]
Force a clean desktop by removing the Desktop
Authored by: Dale Sorel on Jun 22, '04 01:31:14PM

Or if you're running APE, I'd give DesktopSweeper a try: http://www.versiontracker.com/dyn/moreinfo/macosx/22680



[ Reply to This | # ]
Force a clean desktop by removing the Desktop
Authored by: kirkmc on Jun 23, '04 05:46:54AM

I truly don't see the point...

If you don't want anything on your Desktop, don't put anything there. The few programs that download files have settings for an alternate download folder. Why futz around with the system (and risk breaking something when the next update comes around) for something like this? There's also the Folder Action idea, which accomplishes the same thing...

Seriously, this seems a bit too dangerous to be useful.



[ Reply to This | # ]
Force a clean desktop by removing the Desktop
Authored by: risc_abacus on Jun 24, '04 01:44:40AM

Why would moving the Desktop be dangerous? It's user space for the user to do what they want with it... remove it or keep it...

Why remove it/mute it? Simple some people like myself just find it a little to easy to drop URL from a browser to the desktop... or clippings... as I type this I have 81 items on my desktop 81, yes 81 items and its a mess... all links that I want to keep but not links I want to bookmark.



[ Reply to This | # ]
Force a clean desktop by removing the Desktop
Authored by: kirkmc on Jun 24, '04 07:46:48AM

I think it is dangerous because, in spite of it being part of the user space, it's something that the system may look for. And, since by default, downloads go there, it just seems like something that can break.

As for your 81 items on the desktop, well, if you can't put them there, where will you put them? What purpose does removing the desktop have? You'll need to put them somewhere else, and you'll need a way to get them there. (I'm assuming you put things on the Desktop because it's easily accessible.) So if it's no longer available to drop stuff, where do you drop things?

FWIW, I put stuff on my Desktop, but keep it relatively clean, with a few subfolders for different types of files, or I move files into other folders elsewhere in my home folder.



[ Reply to This | # ]