lxqt-panel
lxqt-panel copied to clipboard
Unmount encrypted external drive impossible from plugin-mount menu
Clicking on the eject button in the popup menu from plugin-mount does nothing when usb drive is encrypted. Unmount in pcmanfm-qt sidebar works as expected.
Expected Behavior
Unmount encrypted drive from panel works.
Current Behavior
It does nothing.
Steps to Reproduce (for bugs)
- Connect an encrypted usb drive
- fill out passwd dialog
- try to unmount from panel, plugin mount widget.
System Information
- Distribution & Version: latest git, probably all
Just wanted to say that pcmanfm-qt (actually, libfm-qt) and plugin-mount have totally different methods for it: the former uses GLib/GIO while the latter makes use of solid (belonging to KDE Frameworks).
This is still annoying. Will check in a plasma session if there's something working, not sure if there is an applet on the panel.
This is still annoying.
Because nothing has changed ;)
I'd use only pcmanfm-qt for such jobs.
Just out of curiosity I had a look in the implementation… Tsujan is fully correct here. The plugin itself simply ignores LXQt's (existing) device management approach (-> pcmanfm-qt).
Let me prepare something…
The plugin itself simply ignores LXQt's (existing) device management approach
LXQt is modular and can be used without pcmanfm-qt/libfm-qt. lxqt-panel isn't and shouldn't be dependent on libfm-qt, and vice versa.
Sure lxqt-panel is (conceptually) broken in many ways… What do you suggest!?
Sure lxqt-panel is (conceptually) broken in many ways
I don't know what you're talking about.
What do you suggest!?
Like in other places. If the bug is in the code, it should be fixed. If it's in solid, maybe a workaround could be found. Finally, if solid isn't supposed to handle this situation, the corresponding option could be removed.
In short, someone needs to look into the current code, not to dismiss it altogether.
(As written earlier) I actually had a look in the code (exactly here). Although the "architecture" is very spaghetty :spaghetti: it is unlikely a bug in the lxqt-panel code since the specific scenario can be observed only on encrypted devices. (Spaghetti fixing is not for me anymore… :rofl:)
@stefonarch
I found a little time and, after seeing that the code was simple and clean, added a few debug messages to it. The problem was as simple as this: solid couldn't "see" that an encrypted volume was mounted by GLib/GIO, although GLib/GIO didn't have that problem with solid.
More details:
- I had an encrypted volume on an external disk. First, I mounted it with pcmanfm-qt, but
soliddidn't "see" that it was mounted, or more precisely, the signalSolid::StorageAccess::accessibilityChangedwas not emitted. As a result, the eject button was not enabled. Of course, a disabled eject button couldn't do anything. - Then, I unmounted the volume from pcmanfm-qt and mounted it with Panel's Removable Media plugin instead. This time,
Solid::StorageAccess::accessibilityChangedwas emitted, the eject button was enabled, and I was able to unmount the volume by clicking the eject button.
So, I don't think we can do anything about this. GLib/GIO is simply superior to solid. To put it differently, solid has a bug about encrypted volumes that's revealed by GLib, not when solid is used to mount them.
Then, I unmounted the volume from pcmanfm-qt and mounted it with Panel's Removable Media plugin instead
I connected the device, ignored the popup and used the button on the panel, first it asked me the passwd for kwalletd6, then the passwd for the disk. I remember kwallet to be complicated as many other things in KDE.
https://github.com/lxqt/lxqt-panel/assets/10681413/45675b2a-9b9b-4add-a8e7-3cb0b03dfe2c
first it asked me the passwd for kwalletd6
Nothing about KWallet here, but that's beside the point.
Even if the encrypted volume is mounted by pcmanfm-qt, restarting of Panel makes the Removable Media plugin see the mounted volume and enable its eject button. The bug is that no solid signal is emitted when the encrypted volume is mounted by GLib.
There's no way to fake/send such a signal?
No, but there may be a workaround: to update the mount state every time the popup is shown. I'll make a patch.