Trying to change scroll bar width in Ubuntu 20.04

I have found numerous suggestions on how to do this by editing the gtk.css file in the Theme folders. However, when I try to edit the files, they are read-only and appear to be in a read-only disk. For an example of some paths:

/usr/share/themes/Yaru/gtk-3.0
/snap/gtk-common-themes/1506/share/themes/Yaru/gtk-3.0

Am I looking in the wrong spot or is there something special I have to do the edit these files? I have tried using sudo gedit but get the same error.


Solution 1:

You have to be root in order to edit files in these folders. Using sudo gedit from a standard terminal will not work for some reason. Two step process, first form a standard terminal window type sudo gnome-terminal. This will open a second terminal window as root. Then typing gedit filename will allow edits to the files.

More on the changes needed to increase scrollbar width. First

cd /usr/share/themes/Yaru/gtk-3.0

in the root terminal. then type

gedit gtk.css

which allow you to edit the gtk.css file. add the following to the file:

scrollbar slider {
    /* Size of the slider */
    min-width: 20px;
    min-height: 20px;
    border-radius: 22px;

    /* Padding around the slider */
    border: 5px solid transparent; 
}

save and close. Do the same to a file named gtk-dark.css. Move to

cd /usr/share/themes/Yaru/gtk-3.20 

and edit the same files in that folder. Reboot and you scrollbars will be 20px wide.