Score:1

How can I change my gnome shell theme (user themes extension) using the terminal?

us flag

I want to change my gnome shell theme from the user-theme extension using the terminal. I did dconf watch / to check what changing the theme does and the path it gave me was

/org/gnome/shell/extensions/user-theme/name

"Theme-name"

So I try to do gsettings set org.gnome.shell.extensions.user-theme name "Theme name" but it didn't work (Output: No such schema “org.gnome.shell.extensions.user-theme")

br flag
how did you install user-theme extension? What is the output of `gnome-extensions list`
Parker avatar
us flag
@UnKNOWn my output from gnome-extensions list `[email protected] [email protected] logomenu@aryan_k blur-my-shell@aunetx no-overview@fthx [email protected] [email protected] [email protected]` I installed the extension from https://extensions.gnome.org/
br flag
Ok what is the output of `gnome-extensions show [email protected]`
Parker avatar
us flag
@UnKNOWn `Name: User Themes Description: Load shell themes from user directory. Path: /home/parker/.local/share/gnome-shell/extensions/[email protected] URL: https://gitlab.gnome.org/GNOME/gnome-shell-extensions Version: 46 State: ENABLED`
br flag
Ok. by the way we install this extension, it seems the schemas are not compiled. we have two options, either to compile the schemas or to use the below command. But did you try the dconf way to set the theme?
br flag
`gsettings --schemadir .local/share/gnome-shell/extensions/[email protected]/schemas set org.gnome.shell.extensions.user-theme name "theme_name"`
Parker avatar
us flag
@UnKNOWn How would you do that using dconf? Something like: `dconf write /org/gnome/shell/extensions/user-theme/name "theme-name" ` ? Edit: I just saw your new comment. Thanks it works.
br flag
yes something like that only, I dont have good command on dconf. but, since using dconf you got the result, it is possible too to set what you want via dconf.
Score:1
ca flag

The correct command to change your Shell theme using the terminal is:

dconf write /org/gnome/shell/extensions/user-theme/name "'theme_name'"

where theme_name is obviously the name of the theme you want to use.

Note the use of both " and ' for quoting the theme's name. This is because a key's values should be in GVariant format, as you can read in man dconf:

VALUE arguments must be in GVariant format, so e.g. a string must include explicit quotes:
"'foo'". This format is also used when printing out values.
Parker avatar
us flag
Now it makes sense, thanks for the update!
BeastOfCaerbannog avatar
ca flag
You're welcome!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.