Bug 332033 - Disabling "Enable automatic mounting of removable media" is ignored
Summary: Disabling "Enable automatic mounting of removable media" is ignored
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_deviceautomounter (other bugs)
Version First Reported In: 5.25.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Torrie Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-11 16:09 UTC by Graeme Hewson
Modified: 2022-11-11 10:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme Hewson 2014-03-11 16:09:38 UTC
To reproduce:

1. Plug in a USB stick and mount it through the Device Notifier.

2. In System Settings / Removable Devices, or Device Notifier Settings / Removable Devices, tick "Enable automatic mounting of removable media". In "Automount on Attach" column, tick the USB stick.

As expected, the USB stick will be automounted when it's plugged in in future.

3. Now untick "Enable automatic mounting of removable media" in the setting.

Expected result: no devices will be automounted.

Actual result: no difference. The USB stick (and any others ticked) continues to be automounted. It's necessary to untick it in the "Automount on Attach" column.

With the "Enable automatic mounting of removable media" setting enabled, ~/.kde/share/config/kded_device_automounterrc contains:

[General]
AutomountEnabled=true

With the setting disabled, the AutomountEnabled line is removed, not set to false.

The bug is present in 4.12.3, but there's no entry for this in the report menu.
Comment 1 Graeme Hewson 2014-03-11 16:17:24 UTC
In step 2, I should have also said to untick the default "Mount all removable media at login" and "Automatically mount removable media when attached" settings.
Comment 2 J L Turriff 2015-08-07 07:31:34 UTC
This is extremely desirable, since the list that Removable Devices uses seems to also be used in the file selection tool used by applications.  When provided with a list of devices like

Boot
Root
63.6 Mib Removable Media
20.0 Gib Encrypted Drive
20.0 Gib Encrypted Drive
1.0 Mib Removable Media
20.0 Gib Encrypted Drive
20.0 Gib Encrypted Drive
Local
20.0 Gib Encrypted Drive
20.0 Gib Hard Drive
5.3 Gib Removable Media
17.0 Gib Encrypted Drive
20.0 Gib Hard Drive
20.0 Gib Hard Drive
233.8 Gib Hard Drive
232.0 Gib Hard Drive
17.0 Gib Hard Drive
232.0 Gib Encrypted Drive
233.8 Gib Encrypted Drive
62.7 Mib Removable Media

many of which seem to be duplicates, and many of which are not removable devices, a better way of identifying them is needed.
Comment 3 J L Turriff 2015-08-07 07:34:07 UTC
I would add a snapshot of a file selector window showing this, but for some reason the 'add an attachment' page is not giving me a field to insert the image file location. :-(
Comment 4 Justin Zobel 2021-03-09 07:29:37 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 5 gwarser 2021-03-09 09:57:19 UTC
This still has issues.

Enabling automatic mounting and then ticking checkbox "on attach" next to my usb drive does not work.

Ticking option to mount all media seems ok.
Comment 6 Graeme Hewson 2022-11-11 10:57:28 UTC
Problem is unchanged in Plasma 5.25.5 (Kubuntu 22.10). Updating version number in report.

I think a major source of confusion is that automount works on device names instead of labels.
.config/kded_device_automounterrc contains entries starting with, for instance:

[Devices][/org/freedesktop/UDisks2/block_devices/sdb1]

If the removable media is plugged into a different socket and assigned a different device name, it won't necessarily behave as expected.