This short guide shows you how to hide mounted drives from the Ubuntu Dock in Ubuntu 19.10.
Ubuntu 19.10 will show icons for mounted drives on the Ubuntu Dock. This change makes it easier to access removable drives, SD cards, USB thumb sticks, and remote mounts regardless of which app you’re currently using.
You insert a USB stick, an SD card and, or external drive and —BAM! An icon for it instantly appears in the Ubuntu Dock.
Using the relevant dock icon you can then instantly open the connected drive in the Nautilus file manager, as well as right-click on a dock icon to access the relevant
Safely Remove option.
But not everyone needs or wants instant access to their mounted drives.
And if multiple different removable drives are attached at any one time — think: an SD card, external USB drive, and a Google Drive mount — the dock can get rather crowded quite quickly.
Thankfully you can turn the feature off and stop mounted drives from showing up in the Ubuntu Dock. Access isn’t nuked entirely; can continue to access your removable drives using the Nautilus file manager.
Hide Mounted Drives
You can hide mounted drives in Ubuntu Dock using the
dconf editor tool (GUI) or using the terminal (CLI).
I recommend using the command line option as there’s less chance of accidentally disabling/enabling other hidden features.
Open a new Terminal window (
t) and run this command:
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
The change will take effect instantly and mounted drives showing on the Ubuntu Dock will instantly disappear from view.
If you change your mind and want to enable mounted drives on the Ubuntu Dock in future, just rerun the same command, omitting the ‘false’ switch at the end:
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true
You can access the same setting via a GUI if you install the
dconf-editor tool and navigate to the
org > gnome shell > extensions > dash-to-dock page, switching the
show-mounts toggle to the off position.
Tip Also works in Dash to Dock
Because the Ubuntu Dock is based on the Dash to Dock extension for the GNOME Shell desktop environment the steps mentioned in this post also apply to Dash to Dock v67 and above.
For now it is not possible to whitelist mounts so that only specific drives show up in the Dock. You can either hide mounted drives from the Ubuntu Dock entirely, or not at all.