Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 767  / 1 Year ago, thu, march 30, 2023, 11:31:55

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.


More From » 20.04

 Answers
6

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
" | 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


[#1960] Thursday, March 30, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eving

Total Points: 162
Total Questions: 102
Total Answers: 112

Location: Trinidad and Tobago
Member since Thu, Dec 1, 2022
1 Year ago
;