Skip to main content

Dconf Json

Convert linux gnome config to json and back
To get the gnome .conf file use:

dconf dump / > FILENAME.conf

Example usage to convert conf and store as json file and take json and store as conf file

import dconfjson

dconfjson.json_writer("FILENAME.conf", dest="FILENAME.json")
dconfjson.dconf_writer("FILENAME.json", dest="FILENAME_2.conf")

To load new dconf parameters into gnome use (bash):

dconf load / < FILENAME_2.conf

To get the gnome config out as a python dict use:

import dconfjson

with open(dconf_path, "rb") as fin:
  dconf = fin.read().decode("utf-8")
config_dict = dconfjson.dconf_json(dconf)

Without using files

To get the dconf out as dict without using files:

import dconfjson
import subprocess

def dconf_get():
  spath = "/org/gnome/terminal/legacy/profiles:/"
  cmd = "dconf dump %s /" % spath
  tmp = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
  (out, err) = tmp.communicate()
  return out
  
s_out = dconf_get().decode("utf-8")
config_dict = dconfjson.dconf_json(s_out)

Metadata

Release files for dconfjson 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dconfjson 0.2.4
File Size Uploaded
dconfjson-0.2.4.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dconfjson 0.2.4
File Interpreter ABI Platform
dconfjson-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / dconfjson-0.2.4.tar.gz

Download URL dconfjson-0.2.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
15e7494641df6b3346e38de02a355d755906672650efee2f28c2012feec9e444
BLAKE2b-256 checksum
How to use checksums
a9a3294e3a72f7398d083ebecfa6a17a31f92eea0a141a96ece755e3f740a40c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / dconfjson-0.2.4-py3-none-any.whl

Download URL dconfjson-0.2.4-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8611738919dcfa4af93072304b5604a2c49ab1d75b7c4f73d0bf68f3badc6f94
BLAKE2b-256 checksum
How to use checksums
f46ade979ef2ea3eab606f89d1e7050d8d7635217b164341321464d114f3f324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page