5

enter image description here

Please notice the spinner next to the text " Thunderbird Mail ". I replaced the spinner icon in

usr > share > icons > Yaru

scalable-max-32 > status

and in

scalable > status

both icons have name process-working-symbolic

Even after that, I get this old spinner everywhere. Is it possible to change it to an icon of our choice. ? Thanks.

user227495
  • 4,309

2 Answers2

4

Path of the Image in Question is hard coded as 'resource:///org/gnome/shell/theme/process-working.svg' and this is from the .gresource file being used.

This resource file could be different for login screen and desktop session.

Assuming you are using Default Ubuntu 20.04

you need to edit/replace the file process-working.svg from the .gresource file.

for Default Ubuntu 20.04 /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource file is the one to edit.

I have gone through this process and replaced process-working.svg file with some .svg's and fell in a login loop.

the default process-working.svg file is like this.

enter image description here

and its properties are like this.

enter image description here

There seems to be a trick with svg images, Its a single svg image with different spinners. So I googled and got some 512 x 32 pixels with similar gnome-shell theme and could successfully change the spinner.

Getting/Creating the SVG is going to take much time.. So I used vanilla gnome's spinner and default Yaru's

Yaru's enter image description here

Vanilla GNOME's enter image description here

Edit:

have edited the original process-working.svg file with inkspace like this for testing purpose keeping the original size 512 x 32 px with svg format and tested it.

enter image description here

enter image description here

enter image description here

For Automation Purpose, the below script can be used.

Requirements

  1. First keep your preferred .svg file (512px X 32px) process-working.svg in /tmp directory.
  2. install the package libglib2.0-dev with below command

sudo apt install libglib2.0-dev

then save the below script in a plain text file as pwsvg.sh (process-working.svg)

#!/bin/bash

source="/usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource" backup=$source.BAK

pkg=$(dpkg -l | grep libglib2.0-dev >/dev/null && echo "yes" || echo "no") if [ "$pkg" == "no" ] then echo "


Sorry, the package 'libglib2.0-dev' is not installed. Install the package 'sudo apt install libglib2.0-dev' and then run this Script. For now, Exiting... -------------------------------------------------------------------------------------------------------------------------------------" exit 1 fi

cd /tmp

if ! [ -f "process-working.svg" ] then echo "-----your preferred .svg file 'process-working.svg' not found in /tmp folder. put the process-working.svg file in /tmp directory first.-----" exit fi

if [ "$UID" != "0" ] then echo "This Script must be run with sudo" exit 1 fi

take backup of original resource file

if ! [ -f $backup ] then cp $source $backup; fi

for a in $(gresource list $backup); do b="${a/#/org/gnome/shell/}" mkdir -p $(dirname $b) gresource extract $backup $a > $b done

mv -f process-working.svg ./theme/

FILES=$(find "theme" -type f -printf "%P\n" | xargs -i echo " <file>{}</file>")

cat <<EOF >"theme/gnome-shell-theme.gresource.xml" <?xml version="1.0" encoding="UTF-8"?> <gresources> <gresource prefix="/org/gnome/shell/theme"> $FILES </gresource> </gresources> EOF

cd theme glib-compile-resources gnome-shell-theme.gresource.xml mv -f gnome-shell-theme.gresource $source echo " Reboot to see the changes "

run the command sudo bash pwsvg.sh and reboot.

in case anything wrong, from any tty replace the edited gresource file with the backup one which is /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource.BAK

sudo mv /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource.BAK /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource

Tested in Ubuntu 20.04.2

2

The icons are cached separately from their location, so any changes you make to a theme's assets will not be reflected until that cache is updated ... which can sometimes take years if you never apply updates to a system.

Fortunately, here's how you force the cache to rebuild:

  1. Open Terminal (if it's not already open)
  2. Rebuild the cache:
    sudo update-icon-caches /usr/share/icons/*
    
  3. There is no Step 2.

If this doesn't work ...

  1. Update the timestamps of the theme directories:
    sudo touch /usr/share/icons/Yaru ~/.local/share/icons/Yaru
    
  2. Use the gtk-update-icon-cache command:
    sudo gtk-update-icon-cache
    

Hopefully, you will see that Yaru's process-working-symbolic icon has been replaced with the icon you want to see