It’s no secret that Desktop icons can be hidden in macOS, but unlike many user-configurable options neither
System Preferences nor the
Finder‘s preferences provide a way to toggle their display. It’s true that the Desktop display of drive icons and some device icons can be controlled through the
Finder, but in this context Desktop icons refer to all icons shown on the Desktop including those that represent folders, files or symbolic links.
CreateDesktopkey and its value in the
com.apple.finderdomain. By default this value is set to
true– which ensures icons are shown on the Desktop.
To hide Desktop icons we need to run the following two commands using
Terminal or a similar terminal emulator:
defaults write com.apple.finder CreateDesktop -bool false
These two commands can be combined into one, but it still needs to be executed from the command line:
defaults write com.apple.finder CreateDesktop -bool false && killall Finder
Note: To show Desktop icons simply change
There are two applications I know of that allow you to hide or display Desktop icons. The ever-so-useful Onyx is donationware, but you need to authenticate when opening the application then drill-down through the menus to find the option. No big deal if you only occasionally want to hide or show Desktop icons.
While I may not want to change the visibility of Desktop icons regularly, when needed I want to do so with a couple of mouse clicks avoiding lengthy and easily forgotten
Terminal commands. So I put together a simple
Automator action that toggles the display of Desktop icons and is available from the
Services menu of any application.
219KB22nd December 2018
After downloading, double-click the
desktop-icons.workflow.zip 1 file and move the resulting Automator action
Desktop Icons.workflow to the
/Users/yourusername/Library/Services/ folder. Under macOS Mojave 10.14 2, the new action should automatically be included in the
Services menu. To toggle the display of Desktop icons, select the
App menu of any application, then choose
Important: When Desktop icons are hidden, you cannot left-click the Desktop to give the
Finder focus nor right [control]-click the Desktop to access its context menus. To use the
Finder you need to navigate to it using the
tab keys. This is not a bug in the
Automator action, but a direct result of setting the
CreateDesktop key to
Safari will expand archive files automatically if its Open “safe” files after downloading preference is checked.
2 Earlier macOS releases my require a degree of finessing to get the action to show in the
Services menu. If your having difficulty, first restart your Mac then open
System Preferences >
Services, scroll to the
General section at the end of the list and ensure the action is checked.