I am using Ubuntu GNOME 17.04. I want to change the font of the GNOME top bar from the default font by Adapta to Fira Sans. I already have all the fonts, I just want to change the font of the top bar so it doesn't look out of place compared to everything else.
4 Answers
You may create a custom css override in your home directory and load it from there (otherwise if you make any change in the theme's style sheet, any update of the theme will most probably overwrite it).
First you should know where the Adapta theme is located. If you have installed it from a .deb package or a PPA it should be located at /usr/share/themes/Adapta and there should be a gnome-shell.css file in /usr/share/themes/Adapta/gnome-shell/.
Now follow the steps below.
Create a directory, say
MyThemeeither in~/.themesor in~/.local/share/themes. (You may create~/.themesor~/.local/share/themesif they don't exist.)Create another directory inside
MyThemecalledgnome-shell.Create an empty document in this
gnome-shelldirectory and name itgnome-shell.css.Open this
gnome-shell.cssin a text editor and add the following lines@import url("/usr/share/themes/Adapta/gnome-shell/gnome-shell.css");stage { font-family: FONT_NAME, Sans-Serif; font-size: 14pt; }
Change FONT_NAME to a font of your choice (also you may change the font size) and save the file.
Open GNOME Tweak Tools and activate the User themes extension. (If the extension is not installed, you may install it from here.)
Go to Appearance section of Tweak Tools and click on the drop-down box next to "Shell theme". MyTheme should appear in the drop-down list. Select it.
Restart GNOME shell by typing alt+f2 then R+enter (works in an Xorg session, in Wayland logout and login again).
- 70,557
I have found the answer to my question! The most effective way to change the font of the top bar is to change the font families in the gnome-shell.css file.
To do this, first use
sudo -H nautilus
to open a root version of Nautilus.
You will then want to navigate to /usr/share/themes/"THEME_NAME"/gnome-shell/gnome-shell.css/.
Open the file and where it says something like
stage { font-size: 10pt; font-family: Roboto, Cantarell, Sans-Serif; font-weight: 400; color: #263238; }
change the first font to the name of your font. The result should be something like
stage { font-size: 10pt; font-family: Fira Sans, Cantarell, Sans-Serif; font-weight: 400; color: #263238; }
if you changed the font to Fira Sans.
Restart the shell using Alt+F2 and then type r.
Doing this makes the themes you want have the fonts you want instead of changing to Adwaita.
Note: Updates to GTK Themes can mess up this configuration, so pomsky's answer has been marked as the best.
- 480
In Ubuntu 19.10 the gnome-shell.css location is:
/usr/share/gnome-shell/theme/Yaru/gnome-shell.css
Edit gnome-shell.css as administrator. Then search for
stage {
font-family:
Just add your desired font-family name. For example:
stage {
font-family: Fira Sans, Cantarell, Sans-Serif;
font-size: 10pt;
color: #3D3D3D; }
Done. Save it and log-out and log-in again.
- 71
- 1
- 6
Answering my own question here, changing gnome-shell.css files is no longer needed thanks to the changes provided by GNOME 3.36. Changing the interface font normally now changes the font globally. (everything including the GNOME menu, status bar, etc.)
- 480