Disable automatic USB disk mount at Gnome login?

The Manjaro PC is running as a server. I log into the computer as account A over XRDP, and mount a USB drive using Gnome Disks (the location is automagically selected to /run/media/A/myusbdrive).

I have to sometimes log in as root, beause there are some GUI applications that only work if I logged in as root when connecting over XRDP. The problem is that if I log in as root, Gnome seems to automatically mount the USB drive at /run/media/root/myusbdrive. Since it is root, I do not have the chance to deny mounting by not typing the sudo password.

I do not want automatic mounting of USB disks when logging into account. How can I disable it? Gnome Disks → Additional Partition options → Edit mounting options → Mount at system startup is already disabled, but “user session defaults” is enabled.

Moderator edit: Removed useless screenshot

Hi @kingofmanjar0,



Hope this helps!

Nah. I did that and even rebooted the computer, but the USB disk still automatically gets mounted at /run/media/root/diskname when I log in as root.

Well, the second one, for RedHat, /etc/dconf/db/local.d/00-media-automount worked. To be honest, the two pages were what I had already seen before posting this, because there were top Google search result. But one was 17-years old and the other was for RedHat, so I had thought that the would not work for Manjaro, and decided to ask in this Manjaro forum.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.