Nixpkgs: Can't install a new KDE theme

Created on 28 Dec 2019  路  10Comments  路  Source: NixOS/nixpkgs

Describe the bug

Downloading and installing KDE look-and-feel themes fails silently.

To Reproduce
Steps to reproduce the behavior:

  1. Open System Settings -> Look and Feel
  2. Click "get new look and feel themes"
  3. Click "install" on any theme. Wait for installation to finish.
  4. Notice that no new theme has actually been installed.

Expected behavior

The theme would be installed.

Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.

  • system: "x86_64-linux"
  • host os: Linux 5.3.18, NixOS, 20.03pre206632.b0bbacb5213 (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.1
  • channels(jon): "home-manager, nixpkgs-20.03pre203529.e8f2764fe8d"
  • channels(root): "nixos-20.03pre206632.b0bbacb5213"
  • nixpkgs: /home/jon/.nix-defexpr/channels/nixpkgs

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
bug qkde

Most helpful comment

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'

All 10 comments

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

  • system: "x86_64-linux"
  • host os: Linux 5.4.6, NixOS, 19.09.1686.69ed29f5f41 (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

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 Path

My 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

Error

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

Error with GTK2/3 Themes

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

Solution for GTK2/3 Themes

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ob7 picture ob7  路  3Comments

grahamc picture grahamc  路  3Comments

tomberek picture tomberek  路  3Comments

edolstra picture edolstra  路  3Comments

teto picture teto  路  3Comments