how to hide all the icons on my desktop?

Hi,

I just wonder how to hide all the icons on my Desktop. I do not want that during presentation/projection everybody see whole garbage on the desktop. I know it must be at least some unix command which you type in terminal.

thank you in advance
Andrew

G5, 2.7 Dual, 4.5Gb RAM, Mac OS X (10.4.8)

Posted on Oct 8, 2006 3:09 PM

Reply
12 replies

Oct 8, 2006 5:41 PM in response to Andrei Bocharnikov

Hi Andrew,

There's no built-in command for this, but try the following out:
1. In your Home directory (open a Finder window and click the item in the sidebar that has your user name and a house icon), create a new folder. Call it anything you'd like, but to make things easier in the Terminal, don't use a space or any special characters. For this example, I'll assume that you've used desktopTemp as the name.
2. Open Terminal.
3. Type the following command exactly:
mv ~/Desktop/* ~/desktopTemp/
Then press return.

There! You've moved everything from your desktop to the desktopTemp folder in your home directory. To move everything back use the command:
mv ~/oldDesktop/* ~/Desktop/

Hope that helps.

Oct 8, 2006 6:00 PM in response to Andrei Bocharnikov

This Applescript I threw together will toggle desktop icons. For best results launch from the Applescript menu. If you don't have it enabled you shuld save this script "As Application", then doubleclick it.

be aware that if you recompile this script while it has stored desktop icon positions it will forget all those positions.

Click here to launch Script Editor.
-- http://gnarlodious.com/Apple/AppleScript/Scripts/
-- run this script once to clear the desktop
-- run it again to replace all the icons in their ooriginal positions
property everyItem : missing value
set screenWidth to word 3 of (do shell script "defaults read /Library/Preferences/com.apple.windowserver | sed '/ Width/q' | tail -1") as integer
set screenHeight to word 3 of (do shell script "defaults read /Library/Preferences/com.apple.windowserver | sed '/ Height/q' | tail -1") as integer
tell application "Finder"
if everyItem is missing value then
set everyItem to {name, desktop position} of every item of the desktop
set everyFile to item 1 of everyItem
repeat with loopVar from 1 to count of everyFile
set thisIcon to item loopVar of everyFile
set desktop position of item thisIcon to {screenWidth, screenHeight + 10}
end repeat
else
set everyFile to item 1 of everyItem
set everyPosition to item 2 of everyItem
repeat with loopVar from 1 to count of everyFile
set thisIcon to item loopVar of everyFile
set desktop position of item thisIcon to (get item loopVar of everyPosition)
end repeat
set everyItem to missing value
end if
end tell
beep


Message was edited by: Gnarlodious

Oct 8, 2006 5:53 PM in response to Chris Garaffa

Thank you Chris for your reply and brilliant idea. also I just found one utility called "Mac Pilot" and it allow you to hide everything you have on the Desktop. When i check the "Desktop" folder in my home directory with Finder then i can see all my things still there but it is not vissible on the monitor. My screen is clean, i cant see even hardisks or any mounted volume.

This i want to know, how to do it manually, because Mac Pilot is trial version and i am not going to buy it just to hide icons and folders from the Desktop.

thank you one more time
Andrew

Oct 8, 2006 6:53 PM in response to Andrei Bocharnikov

If it does fail, the failure is non-toxic (fails gracefully). It has to do with OSX not allowing icons to be moved off the desktop. The script works by piling up all the icons into a corner of the screen (lower right) so they are almost invisible but still there. In the case of the failure, no damage is done, the icons simply don't move to the illegal position, making it seem like the script is not even running. (come to think of it, this is pretty odd, since you can Applescript window off the desktop totally)

I'll figure out the prob shortly, getting the size of the monitor the user is looking at is the problem, which I do not know how to do.

Oct 8, 2006 8:04 PM in response to Gnarlodious

OK, here is a script that doesn't need to evaluate the external monitor situation:
-- http://Gnarlodious.com/Apple/AppleScript/Scripts/
-- run this script once to clear the desktop of icons
-- run it again to replace all the icons in their original positions
if (do shell script "ls ~/Desktop/") is not "" then
try
do shell script "ls ~/Desktop/.HiddenIcons/"
on error
do shell script "mkdir ~/Desktop/.HiddenIcons/"
end try
do shell script "mv ~/Desktop/* ~/Desktop/.HiddenIcons/"
else
do shell script "mv ~/Desktop/.HiddenIcons/* ~/Desktop/"
end if

The only thing with this script is, if you add any file to the desktop while it is cleared the script will not restore the desktop until you move the new items off.

Oct 8, 2006 8:48 PM in response to Andrei Bocharnikov

In addition to the others' suggestions, you can enter this into a Terminal window:

defaults write com.apple.finder QuitMenuItem YES

That will add a Quit command to Finder's menu. When you quit Finder, all your desktop icons will disappear until Finder is relaunched. If you don't need to use Finder during your presentation then this is probably the easiest way.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to hide all the icons on my desktop?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.