Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmount encrypted external drive impossible from plugin-mount menu #1639

Closed
stefonarch opened this issue Jul 20, 2021 · 13 comments · Fixed by #2060
Closed

Unmount encrypted external drive impossible from plugin-mount menu #1639

stefonarch opened this issue Jul 20, 2021 · 13 comments · Fixed by #2060

Comments

@stefonarch
Copy link
Member

stefonarch commented Jul 20, 2021

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)
  1. Connect an encrypted usb drive
  2. fill out passwd dialog
  3. try to unmount from panel, plugin mount widget.
System Information
  • Distribution & Version: latest git, probably all
@tsujan
Copy link
Member

tsujan commented Jul 20, 2021

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).

@stefonarch
Copy link
Member Author

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.

@tsujan
Copy link
Member

tsujan commented May 4, 2024

This is still annoying.

Because nothing has changed ;)

I'd use only pcmanfm-qt for such jobs.

@antis81
Copy link

antis81 commented May 5, 2024

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…

@tsujan
Copy link
Member

tsujan commented May 5, 2024

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.

@antis81
Copy link

antis81 commented May 5, 2024

Sure lxqt-panel is (conceptually) broken in many ways… What do you suggest!?

@tsujan
Copy link
Member

tsujan commented May 5, 2024

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.

@antis81
Copy link

antis81 commented May 5, 2024

(As written earlier) I actually had a look in the code (exactly here). Although the "architecture" is very spaghetty 🍝 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… 🤣)

@tsujan
Copy link
Member

tsujan commented May 5, 2024

@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:

  1. I had an encrypted volume on an external disk. First, I mounted it with pcmanfm-qt, but solid didn't "see" that it was mounted, or more precisely, the signal Solid::StorageAccess::accessibilityChanged was not emitted. As a result, the eject button was not enabled. Of course, a disabled eject button couldn't do anything.
  2. Then, I unmounted the volume from pcmanfm-qt and mounted it with Panel's Removable Media plugin instead. This time, Solid::StorageAccess::accessibilityChanged was 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.

@stefonarch
Copy link
Member Author

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.

panel6.mp4

@tsujan
Copy link
Member

tsujan commented May 6, 2024

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.

@stefonarch
Copy link
Member Author

There's no way to fake/send such a signal?

@tsujan
Copy link
Member

tsujan commented May 6, 2024

No, but there may be a workaround: to update the mount state every time the popup is shown. I'll make a patch.

tsujan added a commit that referenced this issue May 6, 2024
`Solid::StorageAccess::accessibilityChanged` isn't emitted when an encrypted volume is mounted by GLib/GIO (e.g., through pcmanfm-qt). This is a workaround.

Closes #1639
tsujan added a commit that referenced this issue May 7, 2024
`Solid::StorageAccess::accessibilityChanged` isn't emitted when an encrypted volume is mounted by GLib/GIO (e.g., through pcmanfm-qt). This is a workaround.

Closes #1639
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants