Created attachment 1025404 [details] This code fails to run as a root user Description of problem: Can someone help why attached code when run as a normal user works but run as a root user gives Unable to use PackageKit: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PackageKit was not provided by any .service files (2) I see same code works fine in F21 with/without root user. Version-Release number of selected component (if applicable): gnome-software-3.16.2-1.fc22 How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: Attached code fails to run as root user when used dbus packagekit API Expected results: code should run as a root user as well. It was working fine in F21. Additional info:
Richard or Kalev, Can anyone of you help here please?
I pushed https://git.gnome.org/browse/gnome-software/commit/?id=79404faac5996351297e97c36a2afa040487d9cb which should make sure that gnome-software is autolaunched when a request comes in over the bus. Not sure it's going to fully fix your use case though - we don't have gnome-shell running in the root session, so it won't be able to show notifications, for example.
Can you please suggest a way to use dbus packagekit api to install packages as root user as s-c-l needs to write /etc/locale.conf as well? I am not sure but can it be possible to create a compat packagekit api package that provides same functionality as available in F21 to allow package installation using packagekit api? I think there should be some provision in current gnome-software's packagekit service api to run under root user so that the running code can also do some other work that need to be done as root user.
My suggestion would be to not run system-config-language as root. Instead, I would change it it to run as a regular user process and have a separate privileged helper for writing /etc/locale.conf. I am sure the people on #fedora-desktop can help come up with a good way how to do the privileged helper.
(In reply to Kalev Lember from comment #4) > My suggestion would be to not run system-config-language as root. Instead, I > would change it it to run as a regular user process and have a separate > privileged helper for writing /etc/locale.conf. Totally agreed.