Hide/Unhide desktop icons on Mac devices
- 05 Dec 2023
- 1 Minute to read
- Print
- PDF
Hide/Unhide desktop icons on Mac devices
- Updated on 05 Dec 2023
- 1 Minute to read
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
The following Shell Script will allow the IT Admins to hide the icons on the desktop on their managed Mac devices.
- Create a file on your desktop, for example, Hide-Desktop-icons.sh and open it in a text editor like notepad++
- Copy the contents below to the file or click here to download the file.Shell
#!/bin/bash # Set the following value to true or false if the icons needs to be shown or hidden ShouldShowIconsOnDesktop=false defaults write com.apple.finder CreateDesktop -bool $ShouldShowIconsOnDesktop && killall Finder
- In the script change the ShouldShowIconsOnDesktop to false, to hide the icons. For example,Shell
# Set the following value to true or false if the icons needs to be shown or hidden ShouldShowIconsOnDesktop=false
- While uploading the script please select Yes for the option "Run script as signed-in user" as shown in the image below.
- This script will hide or unhide the icons only for the current logged in user.
- This will also block the right click on the desktop to open shortcut menus.
- To make the icons visible again and to return the right click to its default function, change the ShouldShowIconsOnDesktop to true. For example,
- In the script change the ShouldShowIconsOnDesktop to false, to hide the icons. For example,
# Set the following value to true or false if the icons needs to be shown or hidden
ShouldShowIconsOnDesktop=true
Please note that to use the Shell scripts, the Scalefusion MDM Client Application must be installed on the device(s). Please follow our guide to publish and install the Scalefusion MDM Agent Application.
Notes:
- The scripts and their contents are sourced from various albeit authenticated Apple Developer communities and forums.
- Please validate the scripts on a test machine before deploying them on all your managed devices.
- Scalefusion has tested these scripts, however, Scalefusion will not be responsible for any data loss or system malfunction that may arise due to the incorrect usage of these scripts.
Was this article helpful?