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,089
  • 17
  • 56
  • 101
  • 1
    For the changes to be picked up by the theme, either Gnome shell should be restarted via the Run command dialog: Alt+F2 + press r + Enter; or, you could cycle (change) themes back and forth in the Settings app's Appearance tab. – Levente Feb 08 '21 at 01:46
  • I restarted the computer at least twice. Also, I modified the core theme. Do I have to change the icon theme through Tweaks ? – user227495 Feb 08 '21 at 01:51
  • @Levente . just tried, switching icon themes has no impact on this condition – user227495 Feb 08 '21 at 01:53
  • 1
    I don't know how to change that icon. All I know is that altering themes is frustrating and in the end, will never be just a small time-investment. It always ends up in loads of time killed into it. By now I try to change only those things that really irritate me. The rest, I just put up with. It's a matter of whether it's worth the effort... – Levente Feb 08 '21 at 02:27
  • 2
    @user227495 how to reproduce the spinner? I mean from which/in which case the spinner appears? – PRATAP Feb 10 '21 at 06:20
  • @UnKNOWn I simply click to open Thunderbird from Favourites from the Side Panel and I can see the above action in top panel. Thanks. – user227495 Feb 10 '21 at 06:22
  • 1
    The location of the icon used can be in different directories not only /usr/share/icons depending on the source you installed Thunderbird from ie. snap, flatpak, apt ..... run locate process-working-symbolic to find out and change the icon in use accordingly. – Raffa Feb 10 '21 at 09:30
  • @Raffa it is the same for all programs, Firefox, Thunderbird, Nautilus, Login through GDM etc. I will the locate option. Thanks. – user227495 Feb 10 '21 at 09:33
  • 1
    @Raffa I can see some entries for Yaru inside Snap. I will try changing them. Thanks for pointing out. – user227495 Feb 10 '21 at 09:51
  • I tried to change the symbolic icons in Snap folder by using Open as administrator in Nautilus. But I was not able to paste at all. Do you think I should CHMOD through Terminal ? If yes, what kind of permissions ? I am afraid of using 777. – user227495 Feb 10 '21 at 10:49
  • 1
    No, don’t. Use mount —bind to test see this. Probably if it woks you need to mount —bind after each reboot or remove snap installed apps and reinstall them with APT. – Raffa Feb 10 '21 at 11:16
  • That is not something we should be doing, right ? I am quite happy the way my system is working right now. Except this spinner. Thanks. – user227495 Feb 10 '21 at 11:37
  • 2
    There is nothing wrong about wanting to customize the look, feel or even functionality to your need. After all this is what open source mean. Snaps however require special handling but it might not work. See if this helps https://askubuntu.com/a/1268402 – Raffa Feb 10 '21 at 11:46
  • I am giving up for now. Kindly let me know how to distribute the bounty. Thanks. – user227495 Feb 10 '21 at 13:34
  • 1
    "how to distribute the bounty." is up to you. If however nobody could come up with a better answer before the bounty period ends, I think @matigo answer shows some research and if he can update it with extra information from the comments above and other sources... I think it will be helpful to somebody in the future. – Raffa Feb 10 '21 at 13:52

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

PRATAP
  • 22,460
  • Thanks. Just to be sure, I am ok with whatever comes before using the desktop. When we are inside, this spinner is a bit "lacks the charm" visually. The above solution modifies what comes within the desktop session, right ? – user227495 Feb 10 '21 at 19:52
  • I tried to find the 512x32 image in Adwaita and Yaru-master without success. I am a bit inexperienced in editing the .gresource file. So I was holding it a bit. I will try to prepare my own SVG. Inkscape will be able to produce one. Are you the old, GDM wallpaper change expert PRATAP ? I would be happy to find the script which can edit the .gresource. Thanks. – user227495 Feb 11 '21 at 09:47
  • 1
    Just found the source SVG in Yaru-master. They are in yaru-master> gnome-shell> src. I will try to make my own version out it. It will take some time. – user227495 Feb 11 '21 at 10:02
  • since this is going to chat room, would it be possible to contact some other way ? Discord or email ? Only for this updates. Thansk – user227495 Feb 11 '21 at 11:46
  • 1
    @user227495 Hi, when comments are more, We will automatically get the link to chat room here it self. – PRATAP Feb 11 '21 at 11:49
  • 1
    Allow me some time. I am trying to perfect my custom image. Thanks. – user227495 Feb 11 '21 at 12:15
  • 2
    +1 for this answer being direct to the point. – Raffa Feb 11 '21 at 14:15
  • It is working now. Thanks. Will it be possible to help with the Plymouth spinner too ? Thanks. – user227495 Feb 11 '21 at 16:57
  • 1
    https://askubuntu.com/a/1243458/739431 i think it gives some idea.. – PRATAP Feb 11 '21 at 17:10
  • @UnKNOWn I have never tried Plymouth customisation. I have some ideas but do not know enough code to make it real. – user227495 Feb 11 '21 at 17:40
  • 1
    @UnKNOWn Please see : https://askubuntu.com/questions/1315767/change-the-default-plymouth-spinner-in-20-04 – user227495 Feb 12 '21 at 06:50
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

  • Thanks for the reply. I tried exactly as you described. I still see the old spinner though. I restarted the system to be sure, but the same. Tried cleaning using Stacer, but no luck. The local icon theme works and replaces the spinner in tabs when nautilus tab content takes time to load. Local icon theme is placed in .icons. – user227495 Feb 10 '21 at 03:10
  • I tried all 3 commands, restarted thrice. Used Stacer to make sure. But I am still getting the old spinner :( – user227495 Feb 10 '21 at 03:59