Describe the bug
Downloading and installing KDE look-and-feel themes fails silently.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The theme would be installed.
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
"x86_64-linux"Linux 5.3.18, NixOS, 20.03pre206632.b0bbacb5213 (Markhor)yesyesnix-env (Nix) 2.3.1"home-manager, nixpkgs-20.03pre203529.e8f2764fe8d""nixos-20.03pre206632.b0bbacb5213"/home/jon/.nix-defexpr/channels/nixpkgsMaintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
A peek into my logs reveals this error:
org.kde.knewstuff.core: Command ' "kpackagetool5 -t Plasma/LookAndFeel -i /tmp/Sweet.tar.gz" ' failed with code 4
And when I try to run that command manually, I get:
Error: Installation of /tmp/Sweet.tar.gz failed: Could not install dependency: 'kns://colorschemes.knsrc/api.kde-look.org/1294011'
Same. Seems it has trouble getting the dependencies. Here's my info, if it matters:
nix run nixpkgs.nix-info -c nix-info -m
"x86_64-linux"Linux 5.4.6, NixOS, 19.09.1686.69ed29f5f41 (Loris)yesyesnix-env (Nix) 2.3/nix/var/nix/profiles/per-user/root/channels/nixosAlso getting this on 19.09. Look related to this:
https://www.reddit.com/r/kde/comments/bp2r8h/cant_install_look_and_feel_themes/
I'm going to guess
Also getting this on 19.09. Look related to this:
https://www.reddit.com/r/kde/comments/bp2r8h/cant_install_look_and_feel_themes/
According to that link rolling back to frameworkintegration-5.57.0-1 fixed the issue.
I have the bug on current nixos unstable in 20.03pre which uses framework-integration-5.64.0 and the other user would have framework-integration-5.61.0 it appears.
If I knew how to write the overlay right now I'd make one to use the older version recommended as working from that reddit thread:
https://archive.archlinux.org/packages/f/frameworkintegration/frameworkintegration-5.57.0-1-x86_64.pkg.tar.xz
Maybe I'll get time to try again later.
Can also confirm that I am having the same issue.
I am not a NixOS user and wasn't able to find out where you store your knsrc files, but while trying Kubuntu and OpenSUSE I got this problem (but for a GTK3 theme dependency). ~In Arch, where I don't have this problem, the files are stored in /etc/xdg/ whereas in the troublesome distributions they where stored in /usr/share/knsrcfiles/. After making them available in /etc/xdg/ this problem was solved.~
I don't know if this is a bug in KDE or in the distributions, just thought I share this.
Edit: see new comment below.
This issue is still present as of today
Checking in here, issue is still present.
Finally had some time to look into this.
knsrcfiles PathMy comment above is inaccurate, the new path (including in Arch) is: /usr/share/knsrcfiles/. /etc/xdg/ is a legacy path that still works: https://phabricator.kde.org/D21259
This might be more than one issue, as @JonathanReeve above had problems with colorschemes.
To check for which specific error you get, download the look-and-feel theme (now called global theme) FILENAME.tar.xz and run:
kpackagetool5 -t Plasma/LookAndFeel -i FILENAME.tar.xz
The problem (for me) was that the filename for the GTK2/3 themes had changed from cgctheme.knsrc and cgcgtk3.knsrc to gtk2_themes.knsrc and gtk3_themes.knsrc: https://phabricator.kde.org/D26717
As a workaround one can make a copy with the old filenames, e.g.:
sudo cp /usr/share/knsrcfiles/gtk2_themes.knsrc /usr/share/knsrcfiles/cgctheme.knsrc
sudo cp /usr/share/knsrcfiles/gtk3_themes.knsrc /usr/share/knsrcfiles/cgcgtk3.knsrc
The real solution is to update old themes. The global theme include a metadata.desktop file which includes one line with dependencies, e.g.:
X-KPackage-Dependencies=kns://cgcgtk3.knsrc/api.kde-look.org/IDNUMBER,...
which should be updated to:
X-KPackage-Dependencies=kns://gtk3_themes.knsrc/api.kde-look.org/IDNUMBER,...
For whatever reason, my mimeapps.list seems to be messed up. What program should open the kns:// protocol URIs?
Most helpful comment
A peek into my logs reveals this error:
And when I try to run that command manually, I get: