I have Zorin OS 17 and wanted to install an app for customizing the folder colors. At the end it displayed the following error message for the folder color:
folder-color (0.3.0) wird eingerichtet ...
gtk-update-icon-cache: No theme index file.
dpkg: Fehler beim Bearbeiten des Paketes folder-color (--configure):
»installiertes folder-color-Skript des Paketes post-installation«-Unterprozess
gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
folder-color
E: Sub-process /usr/bin/dpkg returned an error code (1)
Where did you find this and how did you try to install it?
folder-color reports itself as being a dependency of Nautilus, the default file explorer already installed. I assume this is why you can already change folder colors by right-click -> Folder's Color.
Since ZorinOS comes already with this Nautilus extension there's no need to follow the instruction on that article, although it still should've worked all the same.
Note that the article provides different instructions based on the version of Ubuntu; ZorinOS 16 is based on Ubuntu 20.04 while ZorinOS 17 is based on Ubuntu 22.04. Using the wrong one could be the reason why it didn't work for you.
In any case, it's probably safer and easier to revert the changes and rely on ZorinOS's repositories for this. At the bottom of the article there are instructions to remove the PPA (it's safe to run both commands listed if you are unsure which one you installed) and the package itself. Then, just install normally:
sudo apt install folder-color
If Nautilus is running, close it and give a couple of seconds before launching it again.
Thank you for your detailed instructions! I removed the app and then entered "sudo apt install folder-color". But again I got the same error message:
gtk-update-icon-cache: No theme index file.
dpkg: Fehler beim Bearbeiten des Paketes folder-color (--configure):
»installiertes folder-color-Skript des Paketes post-installation«-Unterprozess
gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
folder-color
E: Sub-process /usr/bin/dpkg returned an error code (1)
Oh, well, in that case make sure to run any pending updates and try again. Although it looks like the error comes from a missing file on your system, as part of the installation process of folder-color.
If updating and trying again doesn't work, can you show the output of:
I have just updated the system. The option "Folder Color for Nautilus" was not listed. Even after restarting the system, the folder colors are still not available.
Yes, it looks like you have an additional source for this package coming from the PPA that you installed earlier, taking priority over the one coming from ZorinOS's repositories.
Can you double check that it's been removed correctly? Launch the Software Store, click on the hamburger menu and then Software Repositories. In the Other Software tab look for the PPA you installer earlier and if it's there make sure is not checked. Then, run sudo apt update and try to install once more.
That's all right, having additional PPA is not a bad thing per-se as long as you trust the developers running those repositories. You seem to have it still enabled, here:
Uncheck this one and, while you are at it, double check there aren't any other mentions to "folder-color" just in case. Then run sudo apt update on the terminal, and try to install it again. This time it should fetch the package from ZorinOS's repository.
By the way, if you check the article again you'll see that the PPA from "costales" as you have it installed should be used for Ubuntu 20.04. As mentioned above ZorinOS 17 uses Ubuntu 22.04, and so you should've used the other command listed in the instructions. Not a big deal, just thought I mention it as it's likely the reason it didn't work in the first place.
For now though, let's get things working back to normal and only if you really want to change them later you can try again.
tim@tim:~$ sudo apt update
OK:1 http://ch.archive.ubuntu.com/ubuntu jammy InRelease
OK:2 https://apt.enpass.io stable InRelease
OK:3 http://ch.archive.ubuntu.com/ubuntu jammy-updates InRelease
OK:4 http://ch.archive.ubuntu.com/ubuntu jammy-backports InRelease
OK:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
OK:6 http://archive.ubuntu.com/ubuntu jammy InRelease
OK:7 https://ppa.launchpadcontent.net/zorinos/apps/ubuntu jammy InRelease
OK:8 https://ppa.launchpadcontent.net/zorinos/drivers/ubuntu jammy InRelease
OK:9 https://ppa.launchpadcontent.net/zorinos/patches/ubuntu jammy InRelease
OK:10 https://ppa.launchpadcontent.net/zorinos/stable/ubuntu jammy InRelease
OK:11 https://packages.zorinos.com/stable jammy InRelease
OK:12 https://packages.zorinos.com/patches jammy InRelease
OK:13 https://packages.zorinos.com/apps jammy InRelease
OK:14 https://packages.zorinos.com/drivers jammy InRelease
OK:15 https://packages.zorinos.com/premium jammy InRelease
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Alle Pakete sind aktuell.
tim@tim:~$ sudo apt install folder-color
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
folder-color ist schon die neueste Version (0.3.0).
Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
libboost-filesystem1.74.0
Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] J
folder-color (0.3.0) wird eingerichtet ...
gtk-update-icon-cache: No theme index file.
dpkg: Fehler beim Bearbeiten des Paketes folder-color (--configure):
»installiertes folder-color-Skript des Paketes post-installation«-Unterprozess
gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
folder-color
E: Sub-process /usr/bin/dpkg returned an error code (1)
Now it has worked, thanks a lot! But I found out something else by chance. Maybe there is a programming error: If the settings for Zorin Appearance are as in the photo ("themes" > "Other"), then only the emblems are displayed in the popup menu selection, but not the folder colors ... !
I think this is dependent on the icon theme. What "folder-color" actually does is simply select a different image file based on the color selected, but if said image doesn't exist for a particular icon set then it's not possible to change it. The "hicolor" icon theme is, I think, the default used by the Gnome desktop environment (used by ZorinOS Core) and doesn't include any colors.
This is the reason the article you were looking at before had instructions to install a more colorful version of Yaru (the icon set used by Ubuntu), and also the reason it was throwing an error: because it couldn't find said icon set.
So now the question is which icon set do you want to use? If you want to use the same as Ubuntu, you can follow the instructions but this time using the version for Ubuntu 22.04: