Scale title bars and menu in Ubuntu 14.04 with Gnome

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


I don't have reputation to comment, so I just want to say thanks to rubo77, because his answer does not only solves the problem well, but adds a useful piece of code to scope into gsettings.

I would also like to contribute some more...

On my HP ProBook 5320m, the output of his script when moving slider from 0.875 to 1 is:

< org.gnome.desktop.interface text-scaling-factor 0.875
> org.gnome.desktop.interface text-scaling-factor 1.0
< org.gnome.desktop.interface cursor-size 21
> org.gnome.desktop.interface cursor-size 24
< com.ubuntu.user-interface scale-factor {'default': 8, 'VGA1': 6, 'LVDS1': 7}
> com.ubuntu.user-interface scale-factor {'default': 8, 'VGA1': 6, 'LVDS1': 8}

but I've found out, that it is enough to change the value in the last line standing for com.ubuntu.user-interface scale-factor LDVS1 parameter. Obviously this is always 8 times the real scale factor and the cursor-size and text-scaling-factor is changing along with it accordingly (for scaling >2 it changes also < org.gnome.desktop.interface scaling-factor uint32 from 1 to 2 or higher, but the described procedure still works the same).

This

function gnsc {
    b=$(echo "scale=0; $1*8" | bc) 
    b=${b%.*} 
    gsettings set com.ubuntu.user-interface scale-factor "{'default': 8, 'VGA1': 6, 'LVDS1': $b}" 
}

is what I put in my .bashrc to change the scaling flawlessly within a terminal, eg. typing gnsc 0.875, even though I don't have that problem of missing slider from the initial question.

This is my first post on StackExchange ever, so I hope someone will find it useful! :)