Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 7286  / 2 Years ago, mon, september 19, 2022, 3:44:07

I am using gnome tweak tools on my system which is Ubuntu 12.04 with a few users set. I want to change the text scaling factor for all the user accounts.



If I use gsettings set org.gnome.desktop.interface text-scaling-factor 0.7 does the job fine but only for the user that is issuing the command. The rest of the users retain their settings which I don't want.



I want to do this from CLI since I am trying to incorporate this later to puppet.


More From » text

 Answers
4

Change defaults by editing the original schemas



  1. Change default value in Glib schema


     sudo nano /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml

    Like:


         <key type="d" name="text-scaling-factor">
    <range min="0.5" max="3.0"/>
    <default>0.7</default>
    <summary>Text scaling factor</summary>
    <description>Factor used to enlarge or reduce text display, without changing font size.</description>
    </key>


  2. Compile schemas


     sudo glib-compile-schemas /usr/share/glib-2.0/schemas



Changing defaults by creating an override file


Otherwise, because you want an easy way for puppet.



  1. You can create a dconf override file:


     sudo nano /usr/share/glib-2.0/schemas/30_my-text-factor.gschema.override


  2. Append override keys & values to it, example:


     [org.gnome.desktop.interface]
    text-scaling-factor=0.7


  3. Compile schemas


     sudo glib-compile-schemas /usr/share/glib-2.0/schemas



The new users and the users uses default (They never changed value or they have reset it) will get the new value effective.


Force all users to use defaults using a lock file


If you want to force users to use default value (their customized value has no effect), add a dconf lock:



  1. Add new lock file or change an existing one at:


     /etc/dconf/db/gdm.d/locks/


  2. Append this line to it:


     /org/gnome/desktop/interface/text-scaling-factor



References:



[#25115] Monday, September 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ouschee

Total Points: 485
Total Questions: 88
Total Answers: 106

Location: Central African Republic
Member since Mon, Aug 10, 2020
4 Years ago
;