How to Access GNOME Settings from the Command Line (gsettings / dconf)

Launch GNOME Settings with gnome-control-center or modify specific keys using gsettings and dconf commands.

The command line is faster than the GUI, but only if you respect the schema

You are configuring a fresh Fedora workstation. You need to disable the screen lock timeout and change the default application for PDFs. You open the Settings app, click through three menus, and change the slider. It works. Now you need to apply these changes to five machines. You open the terminal. You type a command you found on a blog. The command fails with a cryptic type error. You need to understand how GNOME stores settings.

GNOME does not use configuration files. It uses a database with a strict schema. The command line tools expose this database. Understanding the tools prevents broken sessions. A botched setting change can leave your desktop unable to launch applications or render the panel invisible. Run these commands from a terminal session where you can easily switch to a TTY if the display server crashes.

What is actually happening under the hood

GNOME settings live in a key-value store. The store is managed by dconf. The interface to the store is gsettings. gsettings talks to the GSettings API. The API enforces types. Every setting belongs to a schema. The schema defines the key name, the data type, and the default value.

When you run gsettings set, the API checks your value against the schema. If the type matches, the API writes to dconf. If the type fails, the API rejects the command. dconf is the raw backend. You can write directly to dconf. This bypasses the schema validation. This is useful for bulk operations. This is also how you break your desktop.

Think of gsettings as a form with validation. You cannot submit a phone number in the email field. Think of dconf as a direct SQL insert. You can put anything in any column. The database will accept it. The application reading the data will crash when it tries to parse the wrong type.

Settings are not files on disk that get read on startup. They are live values in memory. Changing a setting updates the running session immediately. This is why you do not need to log out or restart the display manager. GNOME propagates changes via D-Bus. The convention is instant application. If a setting does not change immediately, the application is not listening to the D-Bus signal. Restart the application, not the system.

How to discover and modify settings safely

Never guess the schema name. Schema names change between GNOME releases. Keys get renamed. Types get updated. Discovery is the first step. Always verify the current value before overwriting it. The current value shows you the exact type syntax required.

Here is how to find the schema for a specific feature. The list-schemas command outputs every available schema. Pipe the output to grep to filter by keyword.

# List all schemas and filter for keywords related to the interface
gsettings list-schemas | grep interface

Once you have the schema, list the keys inside it. This shows you the exact key names. The key names are case-sensitive. A typo in the key name results in a silent failure or an error.

# List every key available in the interface schema
gsettings list-keys org.gnome.desktop.interface

Before setting a value, get the current value. This confirms the key exists and shows you the data type. Strings appear with single quotes. Booleans appear as lowercase true or false. Arrays appear in parentheses. Copy this syntax exactly when you set the new value.

# Retrieve the current value to inspect the required type syntax
gsettings get org.gnome.desktop.interface gtk-theme

Set the new value using the schema, key, and value. The value must match the type shown by the get command. If the type is a string, wrap the value in single quotes. If the type is a boolean, use lowercase true or false without quotes.

# Set the theme to Adwaita. Single quotes are required for string types.
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'

# Disable the lock screen. Booleans must be lowercase and unquoted.
gsettings set org.gnome.desktop.screensaver lock-enabled false

If you made a mistake, reset the key to its default value. The reset command removes your override. The system falls back to the schema default. This is safer than guessing the default value.

# Remove the user override and restore the schema default
gsettings reset org.gnome.desktop.interface gtk-theme

Run the get command again to confirm the change. If the output matches your expectation, the setting is active. Trust the package manager. Manual file edits drift, snapshots stay.

Verify it worked

Run the get command for the key you modified. Compare the output to the value you set. If the value matches, the database accepted the change. GNOME settings propagate via D-Bus. The change should be visible in the running session immediately.

If you changed a visual setting like the theme or font, the change applies instantly. If you changed a behavioral setting like the lock timeout, the behavior changes on the next trigger. If the GUI does not reflect the change, the GUI might be caching the value. Restart the application or the shell. Do not reboot the machine. A reboot is unnecessary for settings changes.

# Verify the value persisted in the database
gsettings get org.gnome.desktop.interface gtk-theme

Check the GUI if applicable. Open the Settings app and navigate to the relevant panel. The GUI should show the new value. If the GUI shows the old value, the GUI is out of sync. Restart the GUI application. The database is the source of truth.

Common pitfalls and what the error looks like

The most common error is a type mismatch. You passed a string where a boolean is expected. Or you forgot quotes around a string. The error message looks like GVariantType. The error tells you the expected type and the type you provided.

gsettings: error while setting value: GVariantType expected 's' but got 'b'

This error means you passed a boolean (b) where a string (s) is required. Check the get output. Add quotes if the type is a string. Remove quotes if the type is a boolean.

Another common error is the double-quote trap with dconf. If you use dconf write, you must write the GVariant syntax manually. GVariant strings require single quotes. The shell requires double quotes around the entire argument. This results in nested quotes.

# dconf requires manual GVariant syntax. The outer quotes are for the shell.
# The inner single quotes are for the GVariant string type.
dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'"

If you forget the inner quotes, dconf interprets the value as a different type. The application crashes when it reads the setting. Always prefer gsettings over dconf for single key changes. gsettings handles the serialization for you.

A third pitfall is confusing schemas with paths. gsettings uses schemas like org.gnome.desktop.interface. dconf uses paths like /org/gnome/desktop/interface/. The path is the schema with dots replaced by slashes and a leading slash. Mixing these up results in a "key not found" error.

gsettings: error: No such schema 'org/gnome/desktop/interface'

This error means you used a path syntax with gsettings. Replace slashes with dots and remove the leading slash. Use the schema format for gsettings. Use the path format for dconf.

Reset the key before you guess the value. A corrupted type in the database can lock you out of a setting until you clear the override.

When to use which tool

Use gsettings when you need type safety and scripting. Use dconf when you need to bypass validation or dump the entire database. Use gnome-control-center when you are exploring settings and do not need automation. Use dconf-editor when you need a graphical interface for the raw database. Stay on gsettings if you only modify individual keys.

Use gsettings when you are writing a deployment script. The type checking prevents silent failures. Use dconf when you are migrating settings between users. The dconf dump command exports the database in a portable format. Use gnome-control-center when you are a new user learning the desktop. The GUI provides context and descriptions. Use dconf-editor when you are debugging a broken setting. The editor shows the raw value and the source of the override. Stay on the command line if you are managing remote machines.

Where to go next