If you’re using your Mac to give a presentation, you might not want everybody to see your messy desktop! If so, you can run a quick command that will hide your desktop icons.
To temporarily turn off the desktop, open a Terminal window (Finder->Applications->Utilities->Terminal) and type the following line:
defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder
Note that this will mean you can no longer right-click on the desktop or drag files there. The files there will still be accessible by using Finder to browse to your Desktop folder.

To restore things back to normal after your presentation, again open a Terminal window, but this time type the following:
defaults delete com.apple.finder CreateDesktop;killall Finder
Hey, presto! Everything should be back to normal. If not, log out and back in again.
With the use of a quick AppleScript, this Terminal command can even be turned into an standalone application that you can run before each presentation, saving the hassle of the command line.
Open AppleScript editor (Finder->Applications->Utilities->AppleScript Editor), and cut and paste the following code:
display dialog "Desktop icons visible or hidden?" buttons {"Visible", "Hidden"} with icon 2 with title "Switch to presentation mode" default button 1
set switch to button returned of result
if switch is "Hidden" then
do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder"
else
do shell script "defaults delete com.apple.finder CreateDesktop;killall Finder"
end if
Click the Run button on the toolbar to test your script. You should see a dialog box appear with two buttons: Visible and Hidden. To make sure the app works OK, click Hidden to hide the icons, then run the app again and click Visible to reveal them again.
To save the AppleScript as an application, click File->Save As. Type a filename and, in the File Format dropdown list, select Application. Save the file, although not on your desktop–when the icons get hidden, you won’t be able to access it again to unhide them unless you use Finder.
20 responses to “Turn Off Your Desktop [OS X Tips]”
Who still uses desktop icons???
Nice idea. However, for anyone using the AppleScript, remove the tell application start and end blocks as it’s not required. You’ll end up with Terminal being left open anyway.
Ashley I’m not an AppleScript expert but this script doesn’t open a Terminal window.
i expected someone would ask such an idiotic question.
Windows refugees.
It doesn’t open a window, but the Terminal application itself is left open. Enable the indicator and you’ll see.
My mounted volumes.
Or just use Desktopple:
http://foggynoggin.com/desktop…
OK, I see what you mean. Thanks. I’ve fixed the script now to remove the ‘tell’ and ‘end tell’ statements.
Alternatively, create a User account that you use for presentations and has a “clean” desktop.
From this account run your presentation – being sure the file is accessible by setting permissions correctly.
I could try this, I just know I’d mess it up and never see my icons again. I like Wanda’s idea better.
Why not just clean your desktop? That seems so much easier than using terminal to make them disappear or creating another user account.
Excellent. The script works perfectly – please read and follow the instructions. Thanks for sharing.
I use DeskShade. No hassle with Terminal.
That would make too much sense for most people.
Thank you! This is awesome. More applescript tips please.
Cool, thanks! I added a quit command already into my if & else statement, but that’s good to know.
Add this at the end (in the AppleScript editor): quit application “Terminal”
Hi Netnyke, see my comment below in response to Ashley’s discussion. I’ve now removed the references to Terminal in the script, so there’s no need to add a line to quit it.
_______
Keir Thomas
Author of Mac Kung Fu
Over 300 tips, tricks, hints and hacks for OS X Lion
http://pragprog.com/book/ktmac…
Thanks to some awful script on your website, one can’t simply copy & paste any of these scripts into Terminal. Please fix!