Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 433  / 2 Years ago, fri, july 29, 2022, 5:04:12

If I create a new Python file gedit uses Tabs as default for indentation.


I am sure I could find a way to configure gedit to change this to four spaces.


But I have a different goal.


I would like change this for all Ubuntu users for the future.


How to change this for all future Ubuntu users (world-wide)?


More From » gnome

 Answers
6

EDIT


To make this the default for all future users in the world, you would need to go with a feature request, in one of several forms:



  1. Best option: a feature request for the individual application https://gitlab.gnome.org/GNOME/gedit/-/issues

  2. In Launchpad. Mark the bug with the tag [Wishlist] https://bugs.launchpad.net/ubuntu/+filebug

  3. Other options in Where can I send feature requests?


Then you would have to wait for it to be (1) accepted and (2) implemented...
it is not up to you.
You could contribute by developing the change (item 2 above). It may be not really hard.


Note: Given that the default behavior is often times a matter of taste (and I think this is one such case), you might likely have to settle for what was posted in the Original answer below.




Sources / related:



  1. https://wiki.gnome.org/Apps/Gedit/ReportingBugs

  2. https://www.reddit.com/r/Ubuntu/comments/3uo0u6/quick_question_how_do_you_submit_a_feature/




Original answer


gedit preferences, like other GNOME settings, are generally stored via the GSettings API, which is an implementation of the DConf specification.
This stores the settings in a binary database.


The way to read from / write to this is via gsettings get / gsettings set, or dconf dump / dconf load.
So for only the tabs-to-spaces you would use


$ gsettings set org.gnome.gedit.preferences.editor insert-spaces true
$ gsettings set org.gnome.gedit.preferences.editor tabs-size 4

For all gedit settings you could use


$ dconf dump /org/gnome/gedit/preferences/editor/ > gedit-settings.ini
$ dconf load /org/gnome/gedit/preferences/editor/ < gedit-settings.ini

(with a different user).




To make this the default for all future users in your system, you can set system-wide dconf settings by storing them in a text file under /etc/dconf/db/local.d and running dconf update.
Only include here the settings you need.


As opposed to the EDITed part, you have control over this.




Sources / related:



  1. How to save GNOME settings in a file?

  2. https://help.gnome.org/admin/system-admin-guide/stable/dconf-custom-defaults.html.en

  3. https://unix.stackexchange.com/questions/289640/how-to-create-a-default-system-wide-dconf-setting-starting-from-just-created-ad

  4. https://unix.stackexchange.com/questions/8922/where-does-gsettings-store-its-files

  5. https://mail.gnome.org/archives/gedit-list/2015-November/msg00002.html

  6. Where are gedit's preferences?


[#1816] Friday, July 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
restlerfin

Total Points: 347
Total Questions: 112
Total Answers: 108

Location: Ukraine
Member since Wed, Dec 16, 2020
3 Years ago
;