I think I have found the root cause of my problem, though I still do not exactly understand what is happening.
I was led to the right path by this warning that I got today while doing a “zypper dup”:
Note that '/usr/share' is not in the search path
set by the XDG_DATA_HOME and XDG_DATA_DIRS
environment variables, so applications may not
be able to find it until you set them. The
directories currently searched are:
- /root/.local/share
- /opt/kf5/share/
If I open a console with my account, I have these environment variables:
XDG_CONFIG_DIRS=/opt/kf5/etc/xdg:/etc/xdg
XDG_DATA_DIRS=/opt/kf5/share:/usr/share
It would seem that the warning is incorrect.
But to run “zypper dup” I have to use “sudo”, so here is what I get when I run “sudo env|grep -i xdg”:
XDG_CONFIG_DIRS=/opt/kf5/etc/xdg/
XDG_DATA_DIRS=/opt/kf5/share/
On the other hand, if I do a “su -” and then issue “env|grep -i xdg” I get, again:
XDG_CONFIG_DIRS=/opt/kf5/etc/xdg:/etc/xdg
XDG_DATA_DIRS=/opt/kf5/share:/usr/share
This is not what I would expect: I thought that by using “sudo” (or “su”) the new shell would inherit the environment variables of my user, while using “su -” the new shell should use root’s environment variables.
However, here it seems my system is behaving the other way around.
BTW, I did a “su” and then I fixed the XDG* variables to appear as they are in my user account.
Then I started yast and -voila!- the icons are there.
I do not understand why the XDG* variables are not the same as those of my user account when I use “su” or “sudo”.
However, I have been able to fix this problem by editing /etc/environment.
Bye
Cris