Ubuntu – Scale title bars and menu in Ubuntu 14.04 with Gnome

gnometitlebarunity

I've installed gnome in my new 14.04 (not the Ubuntu-Gnome distribution). I've noticed the title bars are huge though, and I would like to change.

The things is that this solution from here is not available for me:

  1. Go to System Settings.

  2. Go to Displays.

  3. Go to "Scale for menu and title bars."

  4. Drag the slider to your preferred size.

Is there somewhere else I could change this? I looked in gnome-tweak-tool and also ubuntu-tweak-tool without success.

This is my display windows and, as you can see, there is no scale option.
This is my display windows and, as you can see, there is no scale option.

Best Answer

You can find out where the setting is changed if you open a terminal:

gsettings list-recursively>/tmp/before
echo 'Now unity-control-center should open. Please change the scaling in "Displays" and close.'
unity-control-center
gsettings list-recursively>/tmp/after
diff /tmp/before /tmp/after |grep '[>|<]'

You find out, that these settings were changed (changing from scaling 1.0 to 2.0):

< org.gnome.desktop.interface scaling-factor uint32 1
> org.gnome.desktop.interface scaling-factor uint32 2
< com.ubuntu.user-interface scale-factor {'HDMI1': 8, 'eDP1': 8}
> com.ubuntu.user-interface scale-factor {'HDMI1': 8, 'eDP1': 16}

Or changing from 1.0 to 1.5 there is changed the text-scaling-factor instead, because scale-factor is integer:

< org.gnome.desktop.interface text-scaling-factor 1.0
> org.gnome.desktop.interface text-scaling-factor 1.5
< org.gnome.desktop.interface cursor-size 24
> org.gnome.desktop.interface cursor-size 36
< com.ubuntu.user-interface scale-factor {'HDMI1': 8, 'eDP1': 8}
> com.ubuntu.user-interface scale-factor {'HDMI1': 8, 'eDP1': 12}

from 1.5 to 2.0:

< org.gnome.desktop.interface scaling-factor uint32 1
> org.gnome.desktop.interface scaling-factor uint32 2
< org.gnome.desktop.interface text-scaling-factor 1.5
> org.gnome.desktop.interface text-scaling-factor 1.0
< org.gnome.desktop.interface cursor-size 36
> org.gnome.desktop.interface cursor-size 24
< com.ubuntu.user-interface scale-factor {'HDMI1': 8, 'eDP1': 12}
> com.ubuntu.user-interface scale-factor {'HDMI1': 8, 'eDP1': 16}

Those settings can be edited by hand with dconf-editor

This is very interesting in context with the about:config variable in Firefox: devPixelsPerPx that changes the size inside Firefox (see also: Why are all HTML form elements huge with a system-wide font-scale factor 2.0?)

Also, you can write a script to change the scale factor with these settings like /usr/local/bin/setscalefactor:

if [ "$1" == "1" ]; then
  # set scaling to x1.0
  gsettings set org.gnome.desktop.interface scaling-factor 1
  gsettings set com.ubuntu.user-interface scale-factor "{'HDMI1': 8, 'eDP1': 8}"
else
  # set scaling to x2.0
  gsettings set org.gnome.desktop.interface scaling-factor 2
  gsettings set com.ubuntu.user-interface scale-factor "{'HDMI1': 8, 'eDP1': 16}"
fi

additionally:

This doesn't scale the title bars and menu, but there is also unity-tweak-tool, where you can change the overall font-scaling.

Maybe that is an alternative you could use apart from the Scaling Support in System Settings

Related Question