Ubuntu – How to change the font of the top bar without changing the shell theme


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.

Best Answer

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.

  1. Create a directory, say MyTheme either in ~/.themes or in ~/.local/share/themes. (You may create ~/.themes or ~/.local/share/themes if they don't exist.)

  2. Create another directory inside MyTheme called gnome-shell.

  3. Create an empty document in this gnome-shell directory and name it gnome-shell.css.

  4. Open this gnome-shell.css in 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.

  1. Open GNOME Tweak Tools and activate the User themes extension. (If the extension is not installed, you may install it from here.)

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

  3. Restart GNOME shell by typing alt+f2 then R+enter (works in an Xorg session, in Wayland logout and login again).