3

I am trying to add a ppa key trough Software Sources - Authentication - Import key file.

I have solved access to Software Sources interface as described here: Software Sources GUI in Kubuntu 18.04.

But launching the tool in terminal and trying to add the key nothing happens.

enter image description here

This is what is seen in terminal:

~$ sudo -H software-properties-kde
[sudo] password for cip: 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/kde/SoftwarePropertiesKDE.py", line 667, in add_key_clicked
    url = KUrl.fromPath(home)
NameError: name 'KUrl' is not defined

I'm in LXQT installed on top of Kubuntu 18.04, the same happens in both.

1 Answers1

1

The problem appears to be with this chunk of code:

home = QDir.homePath()
if "SUDO_USER" in os.environ:
    home = os.path.expanduser("~%s" % os.environ["SUDO_USER"])
url = KUrl.fromPath(home)

I tested in a VM and this appears to be a bug with KUrl not existing, whatever it's supposed to be. I thought at first it might have something to do with running it from the terminal instead of the GUI method, but I tested those methods as well and still get the same error. Also, reading the code, I don't think it's possible that KUrl was defined anywhere or imported as a python module.

I took it upon myself to file this bug in the software-properties repository for Ubuntu:

https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1795278

I suggest for the time being you use the apt-key add <file> command to add the key to your system.