Bug 424413

Summary: "Mount ISO" feature doesn't mount an ISO image if "Enable automatic mounting of removable media" option is unchecked in Removable Devices kcm
Product: [Applications] dolphin Reporter: Patrick Silva <bugseforuns>
Component: plugins: ISO mountingAssignee: Kwon-Young Choi <kwon-young.choi>
Status: RESOLVED FIXED    
Severity: normal CC: kfm-devel, kwon-young.choi, nate
Priority: NOR    
Version: 20.07.80   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 20.11.80

Description Patrick Silva 2020-07-19 12:52:44 UTC
STEPS TO REPRODUCE
1. make sure "Enable automatic mounting of removable media" option
is unchecked in System Settings > Removable Storage > Removable Devices kcm
2. open Dolphin
3. right-click on an ISO image, choose "Mount ISO" 

OBSERVED RESULT
The entry of the ISO image appears in Places panel of Dolphin, under "Devices", but the ISO image wasn't mounted. It only was "inserted".

EXPECTED RESULT
a feature called "Mount ISO" should do what it says: mount the ISO image

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.73.0
Qt Version: 5.14.2
Comment 1 Kwon-Young Choi 2020-07-20 08:19:56 UTC
Hello,

Currently, this is the expected behaviour of the Mount ISO plugin.
In order to mount the ISO file to a directory, you have to manually click on the new entry created in Dolphin.

However, I completely agree that the default behaviour should be to automatically mount the ISO file to a directory but it is a little bit trickier to do.
I have already proposed a merge request to do this: https://invent.kde.org/sdk/dolphin-plugins/-/merge_requests/8
but it is a little bit hacky and I'm not sure the maintainers will agree to do it that way.
Comment 2 Elvis Angelaccio 2020-10-03 18:10:51 UTC
Git commit 2714be04b49d4340c5f23746672eb6a12711f9f6 by Elvis Angelaccio, on behalf of Kwon-Young Choi.
Committed on 03/10/2020 at 18:10.
Pushed by elvisangelaccio into branch 'master'.

Automatically mount directory after attaching loop device

After attaching a loop device, the device needs to be mounted on directory to
be accessible. This can be done manually by clicking on the newly appeared
device in dolphin side bar. This patch automatize this by automatically
mounting the loop device to a directory using Solid after attaching the loop
device.

The way this is done a little bit hacky since the plugin needs to wait for UDisks2 to send a signal to Solid to update its device database. The wait is done using a nested QEventLoop by waiting on Solid::DeviceNotifier::deviceAdded signal.
FIXED-IN: 20.11.80

M  +47   -0    mountiso/mountisoaction.cpp

https://invent.kde.org/sdk/dolphin-plugins/commit/2714be04b49d4340c5f23746672eb6a12711f9f6