openSUSE KDE and intrusive packagekit

Good evening everyone. I have several openSUSE linux OS with KDE desktop. I only use discover to search for software packages. However, I find packagekit too intrusive. I have my own routine: as soon as I start the PC, with the procedure you indicated in another post, I launch the classic zypper dup && flatpak update. This in recent months always outside the desktop session (tty). Do I have the option to delay starting packagekit? I would only need a 5/10 minute head start. I thank you in advance. Mauro

I’d recommend inhibiting it completely, and using zypper instead
https://en.opensuse.org/SDB:PackageKit#How_to_disable_PackageKit

The service is designed to be triggered by D-Bus, but you could create a custom unit file that launches it after a suitable delay if desired.

Hi @deano_ferrari
Thanks for your advice and guidance. Sometimes I lend my old laptop to a friend of mine who can’t handle the CLI. It would be convenient for you to be able to update via discover. So for this reason I would like you to be able to install updates via discover-packagekit. Could you tell me how to delay the launch of this packagekit. Consider that I am denied of operations with “nano”…

Create a custom unit (eg /etc/systemd/system/packagekit.service), and add the following to allow for a 3 minute delay (adjust to your specific requirements)

Description=PackageKit Daemon
# PK doesn't know how to do anything on ostree-managed systems;
# currently the design is to have dedicated daemons like
# eos-updater and rpm-ostree, and gnome-software talks to those.
ConditionPathExists=!/run/ostree-booted
Wants=network-online.target

[Service]
Type=dbus
BusName=org.freedesktop.PackageKit
User=root
ExecStartPre=/bin/sleep 180
ExecStart=/usr/lib/packagekitd
TimeoutStartSec=200

This will override the existing service, and take effect next boot.

So whoever tries to

will wait 3 minutes before being able to do it. Assuming Discover won’t timeout waiting for PackageKit.

That’s typical shooting the messenger. PackageKit is started on demand when some client needs it, it does nothing on its own.

Well yes, it generates a delay so that the OP does not wait (as requested). I assume that the ‘Discover’ user will be completely unaware / won’t care. Just a means to an end.

@deano_ferrari @arvidjaar
Hi, It’s embarrassing but I really don’t know where to use the scripts. In over 1 year that I have been using openSUSE the few things I know how to do at a systemic level are using the Yast GUIs and the zypper dup. Thanks for trying to help. I’ll keep it as it is now… Excuse my inexperience

Not a script. It’s systemd unit files we are talking about.

https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html

1 Like

@deano_ferrari
Thanks for your patience. I’m at a much lower level. What is routine for many is unattainable for me. I read the link page you kindly sent: it’s not feasible for me. I will wait for a simpler solution via gui or yast.
Thanks again

I’m not sure what you mean. You can leave it as is, and use zypper, but you’ll need to kill packagekitd manually (or wait until it is inactive).

Packagekit is started on demand when user starts Discover (or any other PackageKit client). PackageKit stops as soon there is nothing more to do (which would be when user closed Discover at the latest).

No kidding. I mentioned that already. It is even clear form the unit file. I’m not sure what you’re even trying to convey frankly.

What you could do is adjust KDE’s 'Discover ’ behaviour. Under System Settings, navigate to ‘Software Update’ and set it to manual. It won’t cause packagekitd to be triggered into action until it is required. Otherwise it trends to get in the way of users (including myself), and hence the reason it is often inhibited by experienced users. In fact, as I already stated many of us simply inhibit packagekit completely.

1 Like

This setting does not solve the problem. Packagekit is triggered at systemstart by discover6-notifier as it is set to autostart. Simply removing discover6-notifier will prevent starting packagekit at systemstart automatically.

Packagekit is then only started when you use Discover itself…

2 Likes

Yes, I have that inhibited. Maybe I’m confusing the ‘Software Update’ utility. I don’t have any desktop update mechanism enabled by habit.

andrei@tumbleweed:~> pkcon
Failed to contact PackageKit: Error calling StartServiceByName for org.freedesktop.PackageKit: Timeout was reached
andrei@tumbleweed:~>
May 22 11:09:57 tumbleweed dbus-daemon[224]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.44' (uid=1000 pid=12791 comm="pkcon")
May 22 11:09:57 tumbleweed systemd[1]: Starting PackageKit Daemon...
May 22 11:10:22 tumbleweed dbus-daemon[224]: [system] Failed to activate service 'org.freedesktop.PackageKit': timed out (service_start_timeout=25000ms)

The OP updates using zypper.

Hi @hui Thanks @hui. at this point I uninstall discover-notifier
Thank you all

One of the first things I do after a fresh install of Leap:

Disable software updates notifications:
(in plasma) right click the triangle to get “system tray settings”,
deselect “software updates” - you’ll never hear from that deranged ‘apper’ again

:grin:

1 Like

@Teuniz
Thanks for the intervention.