3

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.

3
  • 2
    "Ubuntu 20.14"? There is no such version. Do you mean Ubuntu 20.10 or Ubuntu 20.04 LTS?
    – user300458
    Dec 10, 2020 at 16:24
  • Sorry should be 20.04
    – dschlic1
    Dec 14, 2020 at 16:14
  • I don't know about the snap location. But regarding themes in /usr/share/themes/, I would suggest that you create a directory at /home/<YOURUSERNAME>/.themes/ and copy the original from /usr/share/themes/ there, and modify only your copy. You will need the gnome-tweaks app to enable such themes living in your home folder.
    – Levente
    Feb 16, 2021 at 12:58

1 Answer 1

5

You have to be root in order to edit files in these folders. In a two-step process, first open a standard terminal window and type:

sudo gnome-terminal

which 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.

4
  • 1
    The formatting of the code snippet did not turn out right. Should be: scrollbar slider { /* Size of the slider / min-width: 20px; min-height: 20px; border-radius: 22px; / Padding around the slider */ border: 5px solid transparent; }
    – dschlic1
    Dec 14, 2020 at 16:42
  • fixed formatting
    – devio
    Feb 16, 2021 at 8:10
  • 2
    There is no need to save this as root. You can change only for your user saving it as ~/.config/gtk-3.0/gtk.css May 7, 2021 at 19:11
  • note that this need to be added to correct theme (the one that is in use based on UI that is in use) there are Yaru, Yaru-dark, Yaru-Light themes and then there are gtk versions 2.0, 3.0 and 3.20 in case someone need to add these to later versions of the os
    – AaA
    Aug 13, 2021 at 2:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .