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

Regarding polkit authorization prompts #1362

Open
itsXuSt opened this issue Mar 10, 2025 · 4 comments
Open

Regarding polkit authorization prompts #1362

itsXuSt opened this issue Mar 10, 2025 · 4 comments

Comments

@itsXuSt
Copy link

itsXuSt commented Mar 10, 2025

Record_select-area_20250310111522.mp4

Regarding polkit authorization prompts, when udisks determines that an operation on a partition requires user authorization, the device name is displayed using the drive name + device descriptor format. However, this approach is somewhat counterintuitive. Users are interacting with a partition rather than the entire disk, and average users may not understand the origin of the displayed disk name.

To improve clarity, we propose the following adjustment:
• If a partition has an idLabel (e.g., a user-defined label), display the device name as idLabel (device descriptor).
• If the idLabel is empty, retain the original display format (drive name + device descriptor).

This change would align the prompt with user expectations and reduce confusion. For a practical demonstration, please refer to the example video.


Key Points:

  1. User-Centric Terminology: Use partition labels (idLabel) when available, as they are more recognizable to users.
  2. Fallback Mechanism: Maintain backward compatibility for partitions without labels.
  3. Clarity: Explicitly distinguish partitions from their parent disks in authorization prompts.
@itsXuSt
Copy link
Author

itsXuSt commented Mar 10, 2025

@tbzatek could you please check this, if it's acceptable, I can make a PR.

@tbzatek
Copy link
Member

tbzatek commented Mar 10, 2025

Could you provide udisksctl dump and gio mount -l please?

I believe this should be consistent with what gvfs-udisks2-volume-monitor presents, as much as possible. As the labels can be duplicate, I believe displaying device file is still a necessity. Cc: @ondrejholy

This is the code in question in gvfs: https://gitlab.gnome.org/GNOME/gvfs/-/blob/master/monitor/udisks2/gvfsudisks2volume.c?ref_type=heads#L292-L327

So yes, I agree with your proposal, it should just distinguish different volume types.

Btw. are you running a desktop session as root?! (/run/media/root/)

@itsXuSt
Copy link
Author

itsXuSt commented Mar 11, 2025

gio_mount_l.txt
udisksctl_dump.txt
Hi @tbzatek , here are logs.

I understand what you say, and I'll modify the code and push later, and maybe I should remove all the *.po changes.

I'm not running desktop session as root, but just mounted the partitions by root user so that the polkit dialog could be raised to show the changes when I unmount them by another user.

@itsXuSt
Copy link
Author

itsXuSt commented Mar 13, 2025

Image
Image
Hi @tbzatek , I have tested the modify on latest debian trixie, and the code has been pushed. Could you please review it and give some advise or allow me to merge it?
#1363

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

No branches or pull requests

2 participants