Help disabling automount of specific media

I am using Fedora 37 Silverblue.

When I plug in my old Canon DSLR to my laptop, it automounts the SD card inside as a disk drive. I am trying to disable this behavior. What is the proper way of doing it?

  • How can I disable all automounts of USB disks?
  • How can I disable this behavior only for my Canon?

I have retrieved the deviceid (31cf) and vendorid (04a9) from lsusb:

Bus 005 Device 022: ID 04a9:31cf Canon, Inc. EOS Rebel T1i / EOS 500D / EOS Kiss X3

Bonus points if you can help me identify the exact rule on the exact service (udev? systemd?) that triggered the mount.

Thanks a bunch.

Welcome to the Fedoraproject @jhakimra

Try:
Settings > Removable Media > Never prompt or start programs on media insertion

Thanks for the answer, but it doesn’t do what I want. The only thing achieved is turning off the notification when plugged in. It doesn’t stop the drive from being mount.

Try this then:
Install dconf-editor
go to the path in /org/gnome/desktop/media-handling/automount and deactivate the option.

p.s. I do work on the normal workstation, but Silver-blue should be similar or same.

1 Like