How do I hide the icon for a mounted volume from the dock on Ubuntu 19.10 and later?

7,781

Solution 1

Open Terminal and run the following command:

gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false

Solution 2

In /etc/fstab locate the line that mounts your drive and remove x-gvfs-show

This can also be done in the Disks GUI, select the HDD, choose the options gear and select "Edit Mount Options", specify the options you want and uncheck "Show in user interface"

enter image description here

This will allow other removable media, like USB sticks and external HDD to show up, but your "permanent" extra drives to be hidden as "normal"

Share:
7,781

Related videos on Youtube

foobar
Author by

foobar

Updated on September 18, 2022

Comments

  • foobar
    foobar over 1 year

    I just upgraded from Ubuntu 19.04 to Ubuntu 19.10. This made that my second internal HDD show up in the launcher bar or Ubuntu Dock, which it did not before.

    I read that I should mount it to /mnt instead of /media, but this device was auto-mounted years ago (I believe in Ubuntu 16.04 or so) and I have a lot of symlinks and other references to the path in /media already.

    How can I remove the icon from the dock without unmounting it or having to mount it to a different location? I can not even move it to another location on the bar.

    • guiverc
      guiverc over 4 years
      Why not set the location where you want it to be, ie. making an entry for it in your file system table (/etc/fstab)
  • Hyperplane
    Hyperplane over 4 years
    I was getting this message GLib-GIO-Message: 10:56:36.397: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. and stackoverflow.com/a/45223897/9318372 fixed it.
  • Matthieu
    Matthieu over 4 years
    @Hyperplane I tried with sudo and didn't get it anymore.
  • DankyNanky
    DankyNanky over 4 years
    Running Ubuntu 19.10 and using this command returns no errors, but does not remove the icons from the dock.
  • Anbuselvan Rocky
    Anbuselvan Rocky over 4 years
    I'm using Ubuntu 19.10 and tried the above command. It works perfectly. It removed from the dock immediately.
  • kailor
    kailor over 4 years
    indeed it is working on ubuntu 19.10. Thank you.
  • Eliezer
    Eliezer about 4 years
    Running this on 20.04 hides all icons from the dock on secondary displays
  • pomsky
    pomsky about 4 years
    @Eliezer That should not have happened. Please consider reporting a bug at launchpad.net.
  • ironzionlion
    ironzionlion almost 4 years
    Not working on 20.04
  • ironzionlion
    ironzionlion almost 4 years
    @pomsky I don t get any message at all when trying false or true. I tried several times after rebooting
  • pomsky
    pomsky almost 4 years
    i@ironzionlion Consider asking a new question (with a link to this question as a reference) with enough technical details about your system and the software and perhaps a screenshot.
  • Marijn
    Marijn almost 3 years
    For /etc/fstab, if x-gvfs-show is not listed explicitly and the icon is still displayed, then you can also use the option x-gvfs-hide.