l3ib / nitrogen

Background browser and setter for X windows.
http://projects.l3ib.org/nitrogen
GNU General Public License v2.0
358 stars 40 forks source link

Fails to load "image-loading" default from icon theme #133

Open fabio-blanco opened 5 years ago

fabio-blanco commented 5 years ago

In a fresh install of Ubuntu 18.04 and using the last version of i3 windows manager, when I try to run nitrogen from a terminal it displays the following error message:

$ nitrogen ERR: Could not load "image-loading" from icon theme, this indicates a problem with your Gtk/Gtkmm install.

Maybe the icon "image-loading" is not anymore where it used to be.

$ ls /usr/share/icons/default/ index.theme

Info from my system:

$ uname -a Linux ioguipower 4.18.0-21-generic #22~18.04.1-Ubuntu SMP Thu May 16 15:07:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic

$ gnome-shell --version GNOME Shell 3.28.4

My gnome is working ok.

Apart from this little error, the application seems to be working fine.

daf commented 5 years ago

This is odd! The image-loading icon is in gnome-icon-theme, which is in your distribution, and I'd expect that to be installed by default. Can you check to see if it is, and if not, if installing it, this error message goes away?

We may have to add a dependency on this package in ubuntu if it isn't already.

fabio-blanco commented 5 years ago

This is odd! The image-loading icon is in gnome-icon-theme, which is in your distribution, and I'd expect that to be installed by default. Can you check to see if it is, and if not, if installing it, this error message goes away?

Yes, I've checked it and as it seems, the gnome-icon-theme is not installed by default on ubuntu anymore. See:

$ apt policy gnome-icon-theme gnome-icon-theme: Instalado: (nenhum) Candidato: 3.12.0-3 Tabela de versão: 3.12.0-3 500 500 http://br.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages 500 http://br.archive.ubuntu.com/ubuntu bionic/universe i386 Packages

By querying for all icon theme packages...

$ apt policy *-icon-theme

... I was able to find just two packages installed by default:

humanity-icon-theme: Instalado: 0.6.15 Candidato: 0.6.15 Tabela de versão: *** 0.6.15 500 500 http://br.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 500 http://br.archive.ubuntu.com/ubuntu bionic/main i386 Packages 100 /var/lib/dpkg/status

and

adwaita-icon-theme: Instalado: 3.28.0-1ubuntu1 Candidato: 3.28.0-1ubuntu1 Tabela de versão: *** 3.28.0-1ubuntu1 500 500 http://br.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 500 http://br.archive.ubuntu.com/ubuntu bionic/main i386 Packages 100 /var/lib/dpkg/status

Making a little search on internet I've also found out this article:

https://www.omgubuntu.co.uk/2017/11/suru-default-icon-theme-ubuntu-18-04-lts

I suspect that gnome-icon-theme is not the default on Ubuntu for some time now. As it seems, Humanity is.

I've also installed gnome-icon-theme as you've asked but nitrogen is still failling to load the "image-loading" icon. Searching more deeply I've came to the conclusion that the "image-loading" icon is not where you've expected it to be. At least in gnome-icon-theme package:

$ dpkg -L gnome-icon-theme | grep image-loading /usr/share/icons/gnome/16x16/status/image-loading.png /usr/share/icons/gnome/22x22/status/image-loading.png /usr/share/icons/gnome/24x24/status/image-loading.png /usr/share/icons/gnome/256x256/status/image-loading.png /usr/share/icons/gnome/32x32/status/image-loading.png /usr/share/icons/gnome/48x48/status/image-loading.png

I think things have changed breaking the nitrogen app. It is just a minor bug as the application still works but it seem that it is in fact a real bug.

fabio-blanco commented 5 years ago

Just as an addendum, that's the "image-loading" content of the two icon themes installed by default:

$ dpkg -L humanity-icon-theme | grep image-loading /usr/share/icons/Humanity/status/24/image-loading.svg /usr/share/icons/Humanity/status/48/image-loading.svg

$ dpkg -L adwaita-icon-theme | grep image-loading /usr/share/icons/Adwaita/scalable/status/image-loading-symbolic.svg

RevoluPowered commented 4 years ago

Getting this on arch manjaro with both packages above mentioned installed.

tom-doerr commented 4 years ago

Same issue on Ubuntu 20.04. I didn't have any issues on my old Linux Mint system which was based on Ubuntu 18.04.

hp77-creator commented 3 years ago

How to resolve this? Did anyone get any solution? I tried by installing gnome-icon-theme but no success.

daf commented 3 years ago

Hi all, I think I've got a better handle on what's happening here - thanks so much for the investigative work @fabio-blanco and sorry it's taken so long to address. The funny thing is that while nitrogen logs an "error", it's not at all a problem - nitrogen will just continue without really showing an icon as it loads/creates thumbnails.

I've relaxed the process a lot more as to how it finds the loading icon - it'll search for both image-loading and image-loading-symbolic (like in adwaita, the default in ubuntu), and it'll search for a variety of sizes, as I'm not entirely sure to the logic that gtk uses when you specify a size. I also removed the flags I was passing, I don't think those are needed.

If anyone wants to try it out and is comfortable building nitrogen locally, it's in the image-loading branch here, otherwise I'll likely merge to master and do a patch release in the next two weeks.

IAmDarthMole commented 3 years ago

Hello, I just wanted to reach out to see if this had been fixed elsewhere or if the merge didn't happen? I just hit the same error on Ubuntu 20.04 and came across this issue thread. Thanks!

daf commented 3 years ago

@IAmDarthMole it's in c6fd90dd169efe8b0e2e75a68cbb6be2b950aaa3 but that's not yet merged to master. I haven't had enough systems to test this on yet - if you are comfortable building from source please check that branch out (image-loading) and see if it works better for you - otherwise I'll likely just merge it soon as I'm pretty sure it improves things.

kamaji-xl commented 1 year ago

Currently experiencing this on Manjaro (22.0.4).

tuxslack commented 5 months ago

Using Openbox (Arch-based BigLinux)

Changing the icon and window theme to Adwaita using the lxappearance command, the error in Nitrogen does not appear.

Alterando o tema de icones e da janela para Adwaita pelo comando lxappearance o erro no Nitrogen não aparece.

Tested on Linux distribution based on Arch Linux.

problema com nitrogen

problema com nitrogen - solução

After changing the theme of the icons and the window.

problema com nitrogen - solução final