#962214 Needles dependencies to policykit

#962214#5
Date:
2020-06-04 15:00:17 UTC
From:
To:
Mark Hindley encuraged me to send this bug report even though I had
certain reserves.

gparted up to version 0.32.0-2 could have been installed without
policykit and the full dependencies up to systemd. With package
1.0.0-0.1, that changed with an hard dependency to policykit-1. This
drives that package somewhat unusable for me as I never want to have any
dbus based privileges escalation in my systems.

And I believe that dependency should be lowered to recommend as it is
not mandatory if the disk device is writable by the user (or the tool is
used as root but that would have other security concerns, running a GUI
tool as root).

It is not often that I use the GUI tool gparted but from time to time it
is very useful. So I would ask to lower that dependency to a recommend
only.

#962214#8
Date:
2020-06-04 16:00:27 UTC
From:
To:
I tried this version of gparted this morning. I have a practical suggestion of a
way to resolve this.

gprted works fine running in a terminal as a normal user using sudo for
priviledge escalation. So the policykit-1 dependency does seem overly
restrictive.

Obviously this cannot work when clicking on a menu item.

Maybe the dependency could be 'policykit-1 | sudo' and if pkexec is not found
the /usr/sbin/gparted script could show a notification that it has to be run
with sudo in a terminal?

The majority of users would see no change to the behaviour and those who want to
avoid policykit-1 for whatever reason would be able to do so.

Thanks.

Mark

#962214#13
Date:
2021-04-24 09:46:57 UTC
From:
To:
Is there any hope to remove this dependency to policykit-1 which
prevents users who do not want to use systemd to install the current
version of gparted ?

Best regards,

Julien

#962214#18
Date:
2021-04-26 15:19:23 UTC
From:
To:
julien forest writes:

What does policykit have to do with systemd?  AFAIK, that is the
mechanism that all desktops can use to run a program as root.

#962214#23
Date:
2021-04-29 20:19:24 UTC
From:
To:
Package: policykit-1
Version: 0.105-30
State: not installed
Multi-Arch: foreign
Priority: optional
Section: admin
Maintainer: Utopia Maintenance Team
<pkg-utopia-maintainers@lists.alioth.debian.org> Architecture: amd64
Uncompressed Size: 335 k
Depends: ... default-logind | logind ...

which itself depends on libpam-systemd or libpam-elogind ....

There is no need IMHO to add such a dependency (maybe a recommend).

Regards

#962214#28
Date:
2021-04-30 00:21:41 UTC
From:
To:
julien forest writes:

gparted depends on policykit-1 to get run as root.  Unless there's some
other way that still works these days to do that, removing this
depenency will break the desktop icon.

That depends on either systemd or elogind, which AFAIK, are already
requirements for any of the supported desktops.

Then again, if policykit-1 is already installed in all of the desktops,
the depenency may be redundant?  On the other hand, if it is redundant,
then how will removing it help you?  If it isn't redundant, then what
configurations will break because they don't have policykit-1 and so
launching gparted from the desktop icon will fail?

#962214#33
Date:
2026-07-07 23:15:53 UTC
From:
To:
Dear Maintainer,
I'm using debian without elogind and found that it was in fact very easy
to use gparted without pkexec (which is listed as required dependency).
(Very easy when you know you can build dummy package to ignore not really
required deps...)

All I had to do was make a dummy "pkexec" package and replace its binary by
a one liner script doing "sudo $@" (or with doas but with a xhost option).

I feel like a good alt. solution for gparted would be to simply check for
pkexec and if it's not here, just go for login using doas or sudo (in a
console using "exo-open --launch TerminalEmulator" for instance).

Another solution would be to warn "need to be run as root or install
pkexec" ?

I hope you'll consider it at least !

#962214#38
Date:
2026-07-14 19:55:14 UTC
From:
To:
otyugh <otyugh@debian-facile.org> writes:

Sudo doesn't work if it prompts for a password and isn't attached to a
terminal.

I'm not sure how to get the .desktop file to do such checking and
prompting.  If you can figure it out and provide a patch I'd be happy to
apply it.

The package used to use gksu to prompt for a pasword but that went away
and I was told that PolKit was the cross desktop replacement that should
work for everyone.