Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

carbontune

macrumors member
Original poster
Sep 11, 2018
89
17
United Kingdom
Does anyone know of a way to hide one external drive from the desktop? I still want to see other external drives appear on the desktop when I plug them in, but I have one drive that is kind of permanent now so I don't need to see its icon.
 
I keep at least seven "drive icons" mounted on my desktop at all times.
One gets used to it.

There is a small free app named "Semulov" that can be used to dismount and mount connected drives at will (puts an icon in the menu bar).
Not sure if it's still available, but might be worth investigating.

Note:
I have no idea if Semulov works with APFS (if you're using it).
I use only HFS+ here.
 
I don't want to unmount the drive, I just want to hide it's icon. If I attach a new external drive to the Mac then I want it's icon to appear on the desktop. As this one drive that I'm talking about is kind of a permanent part of my Mac, I don't need to see it's icon on the desktop.
 
Yes, it’s an APFS formatted external SSD. I still want to be able to see it in Finder, just not on the desktop. I know there’s a way to set it’s Hidden property but then it vanishes from Finder too so i would always have to search for it using /Volumes/...
 
Does the icon really "take up that much space" on your desktop?
Why not find an icon you like looking at, and "paste it over" the icon of the drive?

If you make it invisible to the finder, how are you going to -access it- "through the finder" (which can't see it) when you need to do that?

Aside:
Think your desktop has too many icons?
You ought to see MY desktop! ;)
 
I wrote this to toggle drive visibility of individual drives back in 2015.
AppleScript
Still works on High Sierra
Paste the code into Script editor.
Enter the name of the drive you want disappeared.
Run.
The Drive name will still show in open and save dialogs, but not on desktop.
Drive will remain mounted.
Code:
-- Toggle BU Drive Visibility
-- BP 2015
-- You must manually target the drives by inserting the names below.
------------------------------------------------------------------------------------

set drivename to "Tethys (TM)" -- **** Set this to the name of the drive you want to act on. ****
doit(drivename)



do shell script "killall Finder" -- Restart the Finder to show changed visibility This is not necessary as long as I toggle the Finder's vis prefs, but may be in future.

return



------------------------------------------------------------------------------------


on doit(drivename)
    set quoteddrivename to quoted form of drivename
    try
        set attribs to (do shell script "GetFileInfo -a /Volumes/" & quoteddrivename) as text
    on error
        beep (1)
        return
    end try
  
    try
        considering case
            if attribs contains "v" then
                do shell script "SetFile -a V /Volumes/" & quoteddrivename with administrator privileges
            else
                do shell script "SetFile -a v /Volumes/" & quoteddrivename with administrator privileges
            end if
        end considering
    on error
        beep (1)
        return
    end try
end doit
 
Does the icon really "take up that much space" on your desktop?
Why not find an icon you like looking at, and "paste it over" the icon of the drive?

If you make it invisible to the finder, how are you going to -access it- "through the finder" (which can't see it) when you need to do that?

Aside:
Think your desktop has too many icons?
You ought to see MY desktop! ;)
You could also take a blank PNG image and paste it in over the icon -- then you'd be left with just the name of the drive, which hopefully offends the eye somewhat less.
 
I keep 7-10 "drive icons" visible on my desktop at all times, doesn't bother me.

In addition, I keep about 40-50 -other icons- there, too!
 
I can't get this to work with Monterey. Is it possible to work with this mac os?

thanks.
This works in Monterey.

the only way to do this is to hide it from finder completely, not just from the desktop. (It can remain in the sidebar though). to do that run the following terminal command

chflags hidden /volumes/"drive name"

put the drive name in the command. KEEP the quotes. then log out/in and the drive should be hidden from finder and the desktop.

To reverse the effect change "hidden" to "nohidden" in the command.

Another option is to hide all drives from the desktop and put aliases to the ones you do want there back on the desktop. however all new external drive you attach to the computer will be hidden from the desktop too unless you make aliases for them as well.
 
That's is the purpose of the "nobrowse" flag on the "mount" command, also available on the "diskutil mount" subverb. And for this use case works like a charm when specified in the /etc/fstab file, provided that you can forgo mount "automatically" under "/Volumes". Normally good for volumes that are permanently attached.

For this to work you need to:
- Define a specific mount point for the given external volume (more on that later)
- Obtain the volume's UUID, using "Disk Utilitly" "Get Info" for the volume (no way to copy) or diskutil command (will allow copying).

the edit /etc/fstab (with the vifs command - required) as root:

sudo vifs

And add a line like:

UUID=<UUID> <mount_point> apfs rw,nobrowse 0 2

Save it and reattach your device. Works like a charm!
Note that the above command is for an APFS volume. Other formats will require at least to change the filesystem type.

Mount point:

Pick any mount point on your system, as fstab define drives are mounted by root. This is specially good to augment your Mac storage by adding an external drive to a specific point in the filesystem.

Also, to extend your storage with an external drive under multiple points on the filesystem, instead of mounting at one point and making symbolic links (that will not always work), use APFS multi-volumescontainer: these volumes will share the container space and be presented as sepate disks to macOS, so you can have your external drive appear at multiple points on the filesystem and still share the free space. Great for programs that have problems with external drives or sumbolic links (such a UTM for storing VMs).

AND... all other/new volumes will mount under /Volumes and show at the Desktop.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.