0

I'm looking for the files where System settings are stored for the following preferences:

  • Touchpad
  • Gnome Shell Extension Preferences
  • Wifi

It's for a live USB that doesn't persist any prefs. I'm just setting up a little script that restores a few basic preferences so I don't have to redo them every time I use it. It's mostly done but I was missing these few items. I know there is a way to make persistant USB installs but it's not really needed for my purposes.

thebunnyrules
  • 1,083
  • 1
  • 13
  • 20

2 Answers2

2

Touchpad

This depends on what you use to configure the touchpad. For a Synaptics touchpad, you could use the synclient command line tool to save and restore preferences. Other preferences probably get saved somewhere in the dconf database, and you can use gsettings to save and restore those.

Example of Editing Mouse Config using gsettings:

gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false

WiFi

Network Manager settings go in /etc/NetworkManager (and connection setting specifically in /etc/NetworkManager/system-connections). This directory requires sudo access to modify from the command line. The nmcli command line tool can be used to automate configuring network connections to some extent.

GNOME Shell extensions

From the GNOME wiki:

Extension Preferences

Since version 3.3.5, Extensions may be configured in a consistent manner using the gnome-shell-extension-prefs tool. To hook into it, provide a simple javascript file called prefs.js.

It doesn't look like this is meant to be used outside of extensions, and I don't have a GNOME Shell on hand to test with, but gnome-shell-extension-prefs seems to be your best bet to get and set extension preferences.

thebunnyrules
  • 1,083
  • 1
  • 13
  • 20
muru
  • 197,895
  • 55
  • 485
  • 740
  • Thanks alot, I'll give your suggestions a try. For the gnome-extension, I had already looked through prefs.js, it's actually just the preference window as as opposed the preferences themselves. I tried to read through to see where's it's saving the preferences but I couldn't find any reference to any files or dconf (though I have to admit, js and my brains don't mix, so maybe I just missed it). Maybe I should just do a text search for the default values and change the handful of options I don't have at default. – thebunnyrules Dec 15 '17 at 00:51
  • You were right about the mouse settings, they were buried in the dconf database. I was able to change touchpad settings using:
    gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false . Pretty much anything settings can be manipulated that way. I was also able to find the Wifi networks in /etc/NetworkManager/system-connections as you had suggested. Thanks alot.
    – thebunnyrules Dec 22 '17 at 19:00
0

EDIT: Sorry, I misread your question:

The files: - Gnome Shell Extension Preferences: ~/.local/share/gnome-shell/extensions


  • Touchpad: Settings > Devices > Mouse & Touchpad

  • Gnome Shell Extension Preferences: https://extensions.gnome.org/local/

  • Wifi: Settings > Wi-Fi
    • When you've connected to a Wi-Fi Network, a cog wheel will appear in the network when shown in the "Visible Networks" overview.
    • You've got the hamburger menu in the top right corner that enables you to do some connection stuff. There you can also see all you're saved networks via "Known Wi-Fi Networks"
cp3o
  • 41
  • Thanks for the quick reply cp3o but for the touchpad/wifi, I was asking about where the preferences get saved on the ssd or hard drive and not where to find them within the system pref app. As for the gnome-shell prefs, the location you gave me is where the extensions get installed to but not where the preferences get saved. I know this because I've transfered those files to another machine and although I have the extensions now, I don't have their preferences. Thanks for going out of your way to answer me anyway. – thebunnyrules Dec 14 '17 at 07:15
  • About the touchpad/wifi I don't quite know this by heart. For these settings I think @muru's answer is better, but he also doesn't always refer to files of course. As for the gnome-shell extensions I've got the SomaFM extension on my machine and for this extensions I've extensively modified the config in ~/.local/share/gnome-shell/extensions/. Take a look at the subdirectories because you can find some .js-files that might help. In these subdirectories you can also find the pref.js that is mentioned by muru – cp3o Dec 14 '17 at 08:49
  • It seems the extension preferences are also save in dconf: /org/gnome/shell/extensions/ – thebunnyrules Dec 28 '17 at 20:47