Bug 1053325 - Changing yast2 icons does not change the icons for the yast2 modules in the KDE Launcher
Summary: Changing yast2 icons does not change the icons for the yast2 modules in the K...
Status: RESOLVED DUPLICATE of bug 1109378
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: KDE Workspace (Plasma) (show other bugs)
Version: Leap 42.3
Hardware: x86-64 openSUSE 42.3
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-Mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-10 23:13 UTC by Ignacio Taranto
Modified: 2018-11-08 23:46 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Screenshot - YaST in default GNOME installation (52.94 KB, image/png)
2017-08-18 07:59 UTC, Ladislav Slezák
Details
Screenshot - YaST after installing the yast2-branding-openSUSE-Oxygen package (54.06 KB, image/png)
2017-08-18 08:00 UTC, Ladislav Slezák
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ignacio Taranto 2017-08-10 23:13:51 UTC
Environment:
openSUSE Leap 42.3 with Plasma desktop 5.8.7 (no other desktop environment installed).

For instance if I change from "GNOME" to Oxygen icons by installing patterns-openSUSE-kde_yast and yast2-branding-openSUSE-Oxigen, then the the KDE Launcher still displays the "GNOME" icons for every yast2 module.
Comment 1 Ladislav Slezák 2017-08-18 07:59:05 UTC
Created attachment 737179 [details]
Screenshot - YaST in default GNOME installation
Comment 2 Ladislav Slezák 2017-08-18 08:00:46 UTC
Created attachment 737180 [details]
Screenshot - YaST after installing the yast2-branding-openSUSE-Oxygen package

This is how YaST looks after running "zypper install yast2-branding-openSUSE-Oxygen".
Comment 3 Ladislav Slezák 2017-08-18 08:03:44 UTC
I could not reproduce the problem, after installing default GNOME desktop YaST uses the Gnome icons (see the first screenshot), after installing the yast2-branding-openSUSE-Oxygen package the icons have been changed (see the second screenshot).

Did I understand it correctly? How can I reproduce the problem?
Comment 4 Fabian Vogt 2017-08-18 12:12:04 UTC
(In reply to Ladislav Slezák from comment #3)
> I could not reproduce the problem, after installing default GNOME desktop
> YaST uses the Gnome icons (see the first screenshot), after installing the
> yast2-branding-openSUSE-Oxygen package the icons have been changed (see the
> second screenshot).
> 
> Did I understand it correctly? How can I reproduce the problem?

The reporter does not refer to the icons shown by YaST, but the icons shown for the desktop files in the DE's applicastion launcher.
Comment 5 Ignacio Taranto 2017-08-18 14:19:14 UTC
(In reply to Ladislav Slezák from comment #3)
> I could not reproduce the problem, after installing default GNOME desktop
> YaST uses the Gnome icons (see the first screenshot), after installing the
> yast2-branding-openSUSE-Oxygen package the icons have been changed (see the
> second screenshot).
> 
> Did I understand it correctly? How can I reproduce the problem?

The problem are not the icons inside yast, they are shown correctly.

But, if you open the KDE launcher and start typing any yast module, they will appear with the GNOME icons, no matter you have GNOME or Oxygen icons installed.
Comment 6 Manuel Stol 2017-08-27 22:50:31 UTC
Maybe the GNOME images are cached by KDE/Plasma.

Can you clear your icon and thumbnail cache
and see if it helps?

# Clean icon cache
rm -- "${XDG_CACHE_HOME:-"$HOME/.cache"}/icon-cache.kcache"
# Clean thumbnail cache
find "${XDG_CACHE_HOME:-"$HOME/.cache"}/thumbnails/" -type f -delete
Comment 7 Ladislav Slezák 2017-08-28 12:27:26 UTC
Manuel, thanks for the hint, but that did not work for me....

yast2-branding-openSUSE-Oxygen package only creates the /usr/share/YaST2/theme/current/icons symlink which is used by YaST itself.

I found that to change the icon set in KDE I have to change the theme completely: KDE -> Settings -> Configure Desktop -> Icons -> Select "GNOME".


It seems that KDE uses a different mechanism to set the default icon theme than YaST.

I tried to change the icon path from 

  Icon=yast-sw_single

to

  Icon=/usr/share/YaST2/theme/current/icons/48x48/apps/yast-sw_single.png

in the YaST .desktop file, then the correct icon was displayed.

But I do not think this is the correct solution as it hard codes the icons size and then changing the icon theme in KDE as written above will not work. The theme is set by symlink/package presence, not by the KDE setting anymore.


Reassigning to KDE, please check if this can be solved somehow better. Reassign back to YaST if there is a possible solution on the YaST side which I have overlooked...
Comment 8 Manuel Stol 2017-08-28 23:59:56 UTC
YaST searches its module icons under the symlink /usr/share/YaST2/theme/current/icons .

Desktop Environments (DE), like KDE, GNOME and XFCE, use the FreeDesktop.org (FDO) search rules to find icons.
[Note: FDO was previously known as XDG = X Desktop Group.]

The Icon= key in a .desktop file can have the following values:
- an absolute path with file extension to use the specified icon,
- an icon name  without file extension to search for the icon.

Simplefied, an FDO DE searches the icon as follows:
For each directory in the data path ${XDG_DATA_HOME}:${XDG_DATA_DIRS}
it looks under the icons/<theme>/ and then the icons/hicolor/ subdirectories for the icon file.
[Note: Default XDG_DATA_HOME is ~/.local/share and
       Default XDG_DATA_DIRS is /usr/share or /usr/local/share:/usr/share
       depending on the existence of an applications/ subdirectory.]
[Note: FDO DE = DE adhering to FDO standards (i.e. all modern Unix DEs).]


YaST Icons
- Default Aardvark app. and module icons are under /usr/share/icons/hicolor/ .
- Themed module icons are under /usr/share/icons/{oxygen,crystal}/ .
[Note: There is no themed Aardvark application icon,
 only themed module icons for KDE Crystal and KDE Oxygen icon sets.]

KDE/Plasma KF5 Icons
- KF5 by default uses the Breeze theme.
- YaST does not have Breeze themed icons.
- Therefore, KDE/Plasma uses the default HiColor icons.


So:
- What you call "GNOME" icons,
  are actually YaST's default, unthemed icons.
- KDE/Plasma uses the default, unthemed HiColor icons,
  because YaST does not have Breeze themed icons.
  This is the correct behavior as defined by the FDO standard.
- YaST only uses the Oxygen themed icons,
  because it has its own, special way of finding its icons.


To make KDE/Plasma use the Oxygen icons for YaST
do _one_ of the following:
a) Switch to using the Oxygen icon theme
   and use Oxygen icons everywhere (instead of Breeze).
b) Copy the /usr/share/icons/oxygen directory and its subdirectories
   to ~/.local/share/icons/ and remove all non-yast icons
   in order for a single user to have Oxygen themed YaST icons.
b) Copy the /usr/share/icons/oxygen directory and its subdirectories
   to /usr/local/share/icons/ and remove all non-yast icons
   and create the directory /usr/local/share/applications (!!)
   in order for all users on the local system
   to have Oxygen themed YaST icons.
d) Set the backup icon theme for KDE/Plasma to Oxygen.
   However, I don't think that KDE/Plasma supports this.
   In other words, a feature request for kde.org upstream.


This should resolve your issue.
Comment 9 Manuel Stol 2017-08-29 00:16:50 UTC
Oops,
With 'backup icon theme' I mean 'fallback icon theme'.

And yes, you're wright:
YaST's default HiColor icons are ugly GNOME icons.
Comment 10 Manuel Stol 2017-08-29 01:18:46 UTC
To make KDE/Plasma use the Oxygen icons for YaST
do _one_ of the following:

b) For a single user to have Oxygen themed YaST icons:
   Link to/Copy the YaST icons under /usr/share/icons/oxygen/
   in/to ~/.local/share/icons/hicolor/
   with shell script:
"
#!/bin/sh
: ${XDG_DATA_HOME:="${HOME}/.local/share"}
for f in $(find /usr/share/icons/oxygen/ -type f -iname "yast*"); do
  fDst="${XDG_DATA_HOME}/icons/hicolor/${f#*oxygen/}"
  mkdir -p -- "${fDst%/*}"
  ln -s "$f" "$fDst"
  #cp -- "$f" "$Dst"
done
"

c) For all users on the local system to have Oxygen themed YaST icons:
   As root, link to/copy the YaST icons under /usr/share/icons/oxygen/
   in/to /usr/local/share/icons/hicolor/
   and create the directory /usr/local/share/applications !!
   as root with shell script:
"
#!/bin/sh
mkdir -p /usr/local/share/applications
for f in $(find /usr/share/icons/oxygen/ -type f -iname "yast*"); do
  fDst="/usr/local/share/icons/hicolor/${f#*oxygen/}"
  mkdir -p -- "${fDst%/*}"
  ln -s "$f" "$fDst"
  #cp -- "$f" "$fDst"
done
"

[Note: Don't forget to make the shell script executable 'chmod a+x <script>'.]


Sorry, it's late.
Comment 11 Sasi Olin 2018-11-08 23:46:17 UTC
Plan for the future of YaST is to use icons from /usr/share/icons/$theme, theme set by DE. While that is currently supported in YaST Control Center, Breeze falls back to Oxygen and uses those icons in switcher/menus.

This is gonna be fixed with Breeze icons appearing in the distro (boo#971671), but this bug is duplicate of dropping YaST's previous icon directory.

*** This bug has been marked as a duplicate of bug 1109378 ***