取得 GSettings 執行檔

  1. 在 RHEL/CentOS 6 中使用 firefox 68,出現 GSettings 後端使用記憶體,無法存檔,所以每次在 firefox 開檔存檔的 FileChooser 視窗設定都會回到預設值。
    [dywang@deyu ~]$ firefox 
    GLib-GIO-Message: Using the 'memory' GSettings backend.  
    Your settings will not be saved or shared with other applications.
    
  2. 從 CentOS 7 (192.168.122.7) 複製 gsettings 執行檔到 /usr/lib64/firefox/bundled/bin。
    [root@deyu ~]# cd /usr/lib64/firefox/bundled/bin
    [root@deyu bin]# scp 192.168.122.7:/usr/bin/gsettings .
    gsettings                                     100%   24KB  23.8KB/s   00:00    
    
  3. 從 CentOS 7 (192.168.122.7) 複製 gsettings 執行檔到 /usr/lib64/firefox/bundled/bin,沒有 libffi.so.6 函式庫。
    [root@deyu bin]# LD_LIBRARY_PATH=/usr/lib64/firefox/bundled/lib64 ./gsettings
    ./gsettings: error while loading shared libraries: libffi.so.6: cannot open 
    shared object file: No such file or directory
    
  4. 從 CentOS 7 (192.168.122.7) 同步 libffi.so.6 函式庫到 /usr/lib64/firefox/bundled/lib64。
    [root@deyu bin]# rsync -av 192.168.122.7:/usr/lib64/libffi.so.6* \
    /usr/lib64/firefox/bundled/lib64/
    receiving incremental file list
    libffi.so.6 -> libffi.so.6.0.1
    libffi.so.6.0.1
    
    sent 49 bytes  received 32432 bytes  21654.00 bytes/sec
    total size is 32319  speedup is 1.00
    
  5. 可以使用 gsettings 命令了。
    [root@deyu bin]# LD_LIBRARY_PATH=/usr/lib64/firefox/bundled/lib64 ./gsettings Usage:
      gsettings --version
      gsettings [--schemadir SCHEMADIR] COMMAND [ARGS…]
    
    Commands:
      help                      Show this information
      list-schemas              List installed schemas
      list-relocatable-schemas  List relocatable schemas
      list-keys                 List keys in a schema
      list-children             List children of a schema
      list-recursively          List keys and values, recursively
      range                     Queries the range of a key
      describe                  Queries the description of a key
      get                       Get the value of a key
      set                       Set the value of a key
      reset                     Reset the value of a key
      reset-recursively         Reset all values in a given schema
      writable                  Check if a key is writable
      monitor                   Watch for changes
    
    Use “gsettings help COMMAND” to get detailed help.