3

The PackageKit Project dialog keeps popping up to prompt for the root password on my Debian Jessie desktop, apparently assuming that the logged in account has root permissions or knows the root password

Is there someway to disable it in the desktop settings?

3 Answers 3

7

Are you using KDE? I had this problem the other day, and systemctl stop/disable packagekit didn't help at all.

Here's the prompt:

Root password prompt

In this example, polkit.subject-pid is PID 2201, which is:

username 2201 0.0 0.1 1354816 24440 ? Sl Oct27 2:46 kded5 [kdeinit5] 

Which suggests that KDE might be doing something. On my system, KDE doesn't have package management settings in the system settings tool, but opening apper's settings menu I found this:

Apper configuration dialog

Setting this to Never took care of the problem for me.


Update: systemctl mask packagekit works as well. See for example http://0pointer.de/blog/projects/three-levels-of-off, which describes the difference between systemctl stop, disable, and mask. mask makes services completely unstartable until they are unmasked again.

1

Admins please advise if quoting exactly with due credit to the author and author's name is not ok from copyright point of view. If need be will redact or improve the write up as needed. Thanks in advance.

This post is slightly different, it applies to for those who DO NOT want any automated APT process running like my self. The below solution will DISABLE packakekit and also disable the associated error.

My original tinkering was try

sudo systemctl stop packagekit.service 

then run,

sudo systemctl disable packagekit.service 

this will fail, as the service is 'static' type. Those of systemd SME can chime in.

so went ahead and did run,

sudo systemctl mask packagekit.service 

the masking executes successfully. But when you run apt update it will put out a DBus error.

So tinkered with and tried renaming the file /etc/apt/apt.conf.d/20packagekit to say something like /etc/apt/apt.conf.d/20packagekit_Original.conf

Comment out all code lines in the _Original.conf file.

However, the solution provided by Mr. George Shuklin on https://medium.com post: How to disable packagekit more proper in my opinion. As it bakes in with future updates and reverting much easy.

So presenting the solution intrspersed with the post author's quotes and my 'one' additional step of backing up the original apt.conf.d file.

sudo cp -v /etc/apt/apt.conf.d/20packagekit{,_Original_.conf} 

and comenting out all the code lines in the newly created 20packagekit_Original_.conf file with prefixing //

[BEGIN STEPS]

  • Step 1. Make a backup of the file

Create a backup copy of the original distribution provided apt.conf.d file, will come in handy if we want to reverse our steps to restore to distribution default

sudo cp -v /etc/apt/apt.conf.d/20packagekit{,_Original_.conf} 

open the just created Original.conf file

sudo nano /etc/apt/apt.conf.d/20packagekit_Original_.conf 

Prefix each code line with //. So this file is your backup should things don't work for you and want to walk back your steps. This is my innovation to the author's post.

The backedup Original.conf file should have code lines like below commented prefixed //:

//DPkg::Post-Invoke { 
  • Step 2. Disable the service.

Stop systemd packagetkit.service

sudo systemctl stop packagekit.service 

Mask the systemd packagekit.service

sudo systemctl mask packagekit.service 

OR together in one line

sudo systemctl stop packagekit.service && sudo systemctl mask packagekit.service 

In my tinkering I performed upto the above but without the author suggested next step in addition, which in my opinion is the most important. Not having performed the Step 3 had left me with the DBus error. This DBus erro is put out everytime I executed apt update or apt-get update.

So strongly suggest performing the following dpkg-divert step Step 3 per post's author Mr. George Shuklin

  • Step 3. Disable apt integration

Run the following dpkg-divert command as root

sudo dpkg-divert --divert /etc/PackageKit/20packagekit.distrib --rename /etc/apt/apt.conf.d/20packagekit 

the above dpkg-divert will fix / remove the said DBus error upon execution of apt update or apt-get update:

Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked. 

[END STEPS]

On closing, to quote the author George Shuklin's very justified lament:

"That’s all. It's sad that I need to fight the distro authors…"

There's little direction out there onpackagekitdisabling so posting this here and wiki as I hope this will help others with similar predicament as mine, also for folks who would like to perform APT related stuff manually and non-automated on an as needed basis.

Mine is a Debian Testing/Unstable"Sid" mix - "TUM" type of setup with Debian.sourcesfile setup to tracktestingin a rolling way.

0

There are distributions, where neither of this works ...
but one alternatively can disable the refresh manually:

su cat <<EOF >> /etc/yum/pluginconf.d/refresh-packagekit.conf [main] enabled=0 EOF service packagekit restart 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.